Status:
I have a TFS 2013 installation on a dedicated machine and I modified the build template so that it just runs a batch file (no Visual Studio project required), which we commit on our repository. While this batch file runs, it builds our code and runs some custom test suites, which the test output are multiple JUnit XML files.
I already found a way on how I can convert the JUnit XML to .trx files via batch, but now I'm stuck when it comes to publishing those results to TFS.
I found out that there are multiple ways to do that, but unfortunately no way is possible on our build agent right now.
I tried:
Use the TfsPublisher, which is described here - I can't do that because we don't have Visual Studio on our build agent machine installed
Use MSTest.exe as described here, but I can't do that either because -again- we don't have Visual Studio on our build agent machine installed
Question:
So is there an alternative way which I haven't found yet to publish the .trx files to TFS? There must be a solution. I can't be the first person who tries to accomplish that.
Instead of installing all of Visual Studio, you could install the Test Agents for Visual Studio which is much smaller:
https://www.microsoft.com/en-gb/download/details.aspx?id=40750
Related
My yaml github workflow deployment build fails for actions/setup-dotnet#v1 looking for an unloaded SQL Server project. I don't understand why the build machine expects a SQL Server project file. I "Unloaded" the SQL Server project from my Visual Studio solution after creating the dacpac and before pushing. The same solution (now only .NET Core project with the unloaded SQL Server project) builds on my machine. The only reason I created the SQL Server project was for the dacpac.
C:\Users\runneradmin\AppData\Local\Microsoft\dotnet\sdk\5.0.400\NuGet.targets(290,5): error MSB3202: The project file "D:\a\rollbase\Database-Proj\Database-Proj.sqlproj" was not found. [D:\a\rollbase\rollbase\rollbase.sln]
Build FAILED.
Deleting the sql project to produce single proj solution builds successfully on github. So somewhere a reference to the unloaded project exists if it remains visible in VS Solution Explorer. Meaning the only way I can get the runner to build my solution is to delete the sql project after producing the dacpac each time. This seems clumsy and still leaves me not understanding the error.
This fairly recent post Developer Community Issue 2020 seems to indicate the same kind of problem but opposite fail situation. Though it doesn't help to only be able to read one half of the conversation.
Has anyone got a solution for my github DOTNET_VERSION: '5.0.400 build or a better process for getting a targeted dacpac during database updates for a net core solution? I would appreciate any input.
From Prerequisites on the setup property pages, I selected the option to Download prerequisites from the component vendor's web site
There is no Windows Installer 4.5 in the prerequisites to install option..
because every im installing my setup using the sqlexpr_x64_ENU.exe in custom actions to install, run the setup after the extracting sqlserver it pops up the window says
There is a problem with this Windows Installer package. Aprogram run as part of the setup did not finnish as expected. Contact your support personnel or package vendor
im using VS2017 on windows 10
Exclude MSI Engine: You should not include Windows Installer 4.5 with any package these days. This runtime is from back in the day of Windows Vista - we are long since on version 5. Windows Installer should be deployed only via Windows Update as of today - in my opinion. Leave the runtime out of your setup.
No Concurrency: You can not run an MSI setup from within another MSI setup via a custom action. This is due to technical restrictions. There is a mutex set when an MSI runs its actual installation sequence, and triggering another installation sequence from within it will fail. A similar answer on the topic.
Setup.exe Launcher: What you need is to install your pre-requisites via a setup.exe launcher instead. This runs installations in serial, not in parallel. Which version of SQL Server are you installing? I see only a couple of versions available in the Visual Studio Installer Project launcher.
Other tools have features to allow you to install a setup.exe with embedded packages of various kinds in sequence. I have explained a myriad of times how to do this in previous answers. Here are just a few that I found quickly:
SQL Server named instance with Visual Studio 2017 Installer project (basically exactly the same issue - I suggest WiX the open source, free alternative)
Custom installer for application in Visual Studio 2017 (I suggest WiX and several commercial tools that are easier to use - maybe try to read this one)
Cannot call command.exe(SQL Server Setup.exe) while calling C# CA with parameters
How to create a MSI file which simply copies a directory to Program Files? (tools list)
Combine exe and msi file in one installer
Visual Studio 2017 Installer Project - include VC++ 2015 Redistributable
The general situation:
The problem is not Windows Installer 4.5, it's the fact that you are trying to do a recursive MSI install (the SQL one from inside yours) which is not allowed and will fail.
The MSI 4.5 engine is pretty much obsolete, about 10 years old, and anyway it's not the issue, and it's not clear why you believe it is. But it IS in the Prerequisite list on my VS 2017 setup project prerequisites - see 3 - even though you almost certainly don't need it.
There are some SQL Express options available in the Prerequisites of the VS setup project - right click the project in solution explorer and choose Properties, then Prerequisites.
I have VS 2010 project with SQL Server unit tests. I need to convert them to VS2012. After much googling I found a msdn article which does not lay out the steps. The context menu on project does not contain anything related to project upgrade. After opening the project in 2012 you wont see your test sql unit test queries. If I open it in vs 2010 I see them. After opening the project in vs 2012 and if I create new sql unit test it will get pop-up box saying :
I have SSDTBI_VS21012 installed. Any idea how I go about converting my VS2010 project with SQL Server unit tests to VS2012?
I work on the product team, thanks for raising this. After a quick investigation, this looks like it is a regression introduced in the July release of SQL Server database tooling in Visual Studio. Could you please file a connect bug for this issue at https://connect.microsoft.com/SQLServer/feedback/CreateFeedback.aspx and use the category "Developer Tools(SSDT, BIDS, etc.)". We will treat this as high priority, and this is the best way to ensure it'll get tracked and you can see when it's fixed.
Unfortunately there is no workaround in the July/November releases as an overzealous check was added to avoid showing this option for all unit test projects, and we don't have an overrideable command. However, to unblock yourself you should be able to do one of two things:
Workaround #1 uninstall the database tooling components and install an earlier version instead. Here's how:
Go to Add/Remove Programs
Uninstall "Microsoft SQL Server Data Tools 2012", which is the overall installer, if present
Uninstall "Microsoft SQL Server Data Tools - enu" (if you have English installed).
You shouldn't have to uninstall "Microsoft SQL Server Data Tools Build Utilities - enu" if you're using July/November release as it's no longer relevant. However if you run into trouble, consider uninstalling this too.
Install the April release of SQL Server tooling for VS2012 instead. The SSDTSetup.exe file to do this is found at http://download.microsoft.com/download/0/D/F/0DF6C816-A7D5-4C17-8B10-2061FC97D37E/EN/SSDTSetup.exe. Note if you are not using English, change the "/EN/" part of the URL to a different language such as DEU and it should allow you to download that language version.
Workaround #2 Migrate to a new Unit Test Project
You can alternatively create a new SQL Unit Test Project and migrate your tests across:
Create a unit test project based on a procedure in your SQL Project, or create a new Unit Test Project and go to "Add -> New Item -> SQL Server -> SQL Server Unit Test").
When it opens the SQL Server Test Configuration dialog, be sure to enter valid values for the reference project and the connection string(s) - these should match your previous project
Copy across your unit test files from the old project. If you build, it will fail due to a missing reference. We'll fix that next.
Unload the project (right-click, unload project) and add the following snippet near the top:
<PropertyGroup>
<IncludeSsdtUnitTestAdapter>True</IncludeSsdtUnitTestAdapter>
</PropertyGroup>
Reload the project, and build. This should now pass as the adapter DLL used in migration will be included in the references.
Lastly, run the tests and it should work.
I am trying to create, test and deploy a SQL CLR (database project) using Visual Studio 2012 (update 2) and it is getting very frustrating.
The coding itself was trivial but now I cannot deploy or execute unit tests on the project. I have developed SQL CLR in VS 2010 and it was much simpler (Test.sql).
So here are my questions:
How does one set up a local SQL script to test the newly minted functions/sprocs? [I have tried adding a .sql file and marking it to be run on debug but I get error SQL71006.]
How does one deploy the project? I am deploying to SQL 2008 R2 and I know I need to use .NET 2.0 but I still have not been able to deploy anything. When I execute the generated .SQL on the target SQL Server instance, nothing happens (no errors, nothing).
This has worked so well with previous versions of Visual Studio one wonders if MSFT is perhaps now trying to discourage the generation of SQL CLR modules?
For first point, ensure that .sql file in properties has anything then Build in field Action
For second point, try to use a Publish option, where you will get a dialog box to set up database connection and other config option.
Deploy option does nothing when you work with database projects.
Greets.
I've developed some SSIS packages that I want to load up and execute in C# code. The C# code is deployed on our application machine.
I've referenced the SQLServer.ManagedDTS DLL in my C# project.
I tried gac'ing that DLL on our staging application box, which incidentally also seemed to require gac'ing the SQLServer.DTSRuntimeWrap DLL as well.
The code to execute the package is like so
Runtime.Package package = new Runtime.Application().LoadPackage(ssisPackageFilePath, null);
package.Variables["FilePath"].Value = sourceFilePath;
//Excute Package to insert data from source csv file into a SQL table
Runtime.DTSExecResult results = package.Execute();
When I try to run the process I get the following error
An Integration Services class cannot be found.
Make sure that Integration Services is correctly installed on the computer that is running the application.
Also, make sure that the 64-bit version of Integration Services is installed if you are running a 64-bit application
I figured I should be able to simply gac (Install) the one DLL I used to develop the code that executes an SSIS dtsx package file.
I developed the package in a Visual studio 2008 BIDS project which results in a dtsx file.
I referenced the SqlServer.ManagedDTS DLL in a visual studio 2010 project to execute the dtsx file from code.
Tested and debugged locally with success.
What do I need to do to setup my application box in order for my code to be able to execute an SSIS package?
I'm hoping I'm not limited to only being able to execute packages from code on a box that has an instance of SQL server or IntegrationServices installed; which may mean the need for another license.
Do I need to install Integration Services on my app box?
Yes, you need to install Integration Services to run the package on a server. Just deploying DLLs into GAC won't help in executing a package.
Here is the MSDN link that describes about Running an SSIS Package Programmatically on a Remote Computer.
You need to have at least one server with Integration Services installed to be able to do what the MSDN article describes.