TeamCity configuarion for nUnit run - configuration

I have an issue with setting up TeamCity for nUnit run and below lines are added for edit assembly files.
"%system.NUNIT_EXE%"
"%env.ROOT_FOLDER%\FunctionalTests\bin\Debug\Test.dll" /nologo
/framework=4.0.30319 /labels /xml=c:\simulator\TestBox.xml
/fixture:Instron.Tests.Test_FunctionalTests
I get the error message saying when I run TeamCity.
Failed to parse TeamCity implicit arguments. Illegal characters in
path.
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.IsPathRooted(String path)
at JetBrains.TeamCity.Utils.FsScanner.RealFileSystem.IsPathAbsolute(String
path)
at
JetBrains.TeamCity.Utils.FsScanner.DirectoryScanner.ParsePattern(IFileSystem
fs,
Wildcard[] rootPrefix, Boolean caseSensitive, String pattern)

You can find the parameters in the project settings on the Administration page. Use the Add new parameter button to add the parameters for your build.
Check the official documentation to get more information.

Related

Unable to build SSRS Project

I am trying to set up a build pipeline in Azure DevOPS to build a SSRS project. I have a VSBuild task setup like so
- task: VSBuild#1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:OutDir="bin\Debug" /p:OutputPath="bin\Debug" /verbosity:diagnostic'
configuration: '$(configuration)'
I am getting the following error
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Reporting
Services\Microsoft.ReportingServices.MSBuilder.targets(30,5): Error
MSB4018: The "ReportBuilderTask" task failed unexpectedly
System.ArgumentException: The OutputPath property cannot be blank. It
must provide a relative path that is a child folder under the path of
the report server project. at
Microsoft.ReportingServices.BuildProcess.ReportProjectOptions.GetOutputDirectory()
at
Microsoft.ReportingServices.BuildProcess.ReportProjectOptions.GetOutputFile(String
fileName) at
Microsoft.ReportingServices.BuildProcess.Builder.BuildReport(ReportReportNode
node, ReportProjectOptions options, IMessageHandler messageHandler,
ICheckPublish checkPublish) at
Microsoft.ReportingServices.BuildProcess.Builder.BuildItems(ICollection
collection, ReportProjectOptions options, IMessageHandler
messageHandler, ICheckPublish checkPublish) at
Microsoft.ReportingServices.BuildProcess.ReportBuilderTask.Execute()
at
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
I checked the PropertyGroup for my configuration and I do see OutputPath, I am also supplying it as an MSBuild parameter additionally, but it isn't getting picked up it seems.
What am I missing? I am using the hosted agent.
As stated in the error message, the path cannot be full path. The azure devops variables carry full absolute paths. I have changed the OutputPath property to carry the relative path and things seem to work now.

Unable to cast COM object of type 'System._COMObject' to interface type

I have 3 SSIS packages. Two out of the 3 SSIS packages work perfectly, the third. Which is a copy of the 2nd one, except changing connection strings keeps throwing the problem:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D4E5AF42-7999-473C-8082-6EFC676953C4}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).
It has been doing this ever since I copied the package over. I have followed through online guides and run the regsvr32 dts.dll and this said it was successful but nothing has changed. I still get the error, why is this?
The SSIS package seems to validate my containers, it takes a long time to do this compared to the other two and then fails later on in the validation throwing the above error message.
You can't just copy the package, but you need additionally to change the name and generate new GUID (which identifies the COM object) for this package. Check this MSDN article for more info.
Here is the workaround: Solution Explorer -> right click project ->properties->debugging->Run64bitRuntime->set to false.
I hope it helps others. The solution worked for me:
I registered the assembly using the gacutil.exe. My SSIS project target server version was SQL 2012. So, I was using the DTSPipelineWrap.dll version 11.0. I opened the "Developer Command Prompt for VS2015" in Administrator mode, then typed the following command: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe /i "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll"
Then from my SSIS script task, References--> I removed the existing DTSPipelineWrap which was using the assembly from the location "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll". Then in the References folder, right click-->Add Reference-->Browse find the assembly from the location "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.DTSPipelineWrap\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SQLServer.DTSPipelineWrap.dll"
Click Ok. Rebuild the code and executed the package. It has worked for me.
In my case this is was a validation overload/timeout, the package contained references to hundreds of tables.
Opening the offending data flow forced re-validation and cleared the error.
Project --> Properties --> Configuration Properties --> Debugging
and then change Run64BitRuntime to False under Debug Options
In case this might help someone: I got this error due to timeout issues caused by a poorly optimised query. There was nothing inherently wrong with the SSIS package and it ran fine once i fixed the problem in the DB Source.

MSDeploy gulp build package

Is it possible to deploy a Single Page App project build using grunt to IIS using MSDeploy from TeamCity? The project is not any kind of Visual Studio solution and doesn't get built using MSBuild.
My Command parameters which are not working are:
-source:package='%teamcity.build.checkoutDir%\Dist.%build.number%.zip' -dest:auto,computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -setParamFile:"%teamcity.build.checkoutDir%\Dist.%build.number%.zip.SetParameters.xml"
-AllowUntrusted -setParam:"IIS Web Application Name"="%system.WebSiteName%" -verbose
The error I am getting is:
[11:47:31][Step 3/3] Error Code: ERROR_EXCEPTION_WHILE_CREATING_OBJECT
[11:47:31][Step 3/3] More Information: Object of type 'package' and
path 'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' cannot
be created. Learn more at:
http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT.
[11:47:31][Step 3/3] Error: The Zip package
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip' could not
be loaded. [11:47:31][Step 3/3] Error: Could not find file
'D:\TeamCity\buildAgent\work\e2b0015b49d87e90\Dist.30.zip'.
[11:47:31][Step 3/3] Error count: 1. [11:47:31][Step 3/3] Process
exited with code -1 [11:47:31][Step 3/3] Step Deploy (Command Line)
failed
My build process is working as I end up with the correct artefacts, I just don't seem to be able to deploy my generated artefacts using MSDeploy
This is a screenshot of my artefacts:
I managed to get this working by changing my parameters to the following:
-source:iisapp='%teamcity.build.checkoutDir%\dist' -dest:iisapp='C:\www\xxxx-website',computerName="%system.MsDeployServiceUrl%",userName="%system.UserName%",password="%system.Password%",authtype="basic",includeAcls="False"
-verb:sync -AllowUntrusted -verbose
And changing my user to an admin user rather than an IIS user. Note use of iisapp - the key was to read the MSDeploy api using msdeploy -help
FYI - a good test is to use the intended command against msdeploy.exe in console and check output errors then push command into teamcity when it's working.
I created a grunt and gulp plugin to do just what you are looking to do. gulp-mswebdeploy-package and grunt-mswebdeploy-package will create a ms webdeploy package from any folder and do not require your build to be running on windows.
https://www.npmjs.com/package/gulp-mswebdeploy-package
https://www.npmjs.com/package/grunt-mswebdeploy-package

Netbeans not responsing output & running any program create errors due to ant

I am getting this problem after running any program in netbeans7.2
my java path are as follows
C:\Program Files\Java\jdk1.6.0_23\bin
my netbeans install in C:\Program Files\NetBeans 7.2 Beta
The following error occurred while executing this line:
jar:file:/C:/Program%20Files/NetBeans%207.2%20Beta/java/ant/lib/ant.jar!/org/apache/tools/ant/antlib.xml:37: Problem: failed to create task or type componentdef
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Passing connection string properties when using DTEXEC

I am wondering what the correct format is for passing connection string properties on the command line when using dtexec:
dtexec.exe /Ser IpAddress\Instance /IS "\SSISDB\Data Warehouse\MyProject\MyPackage.dtsx" /DumpOnError /Set \Package.Variables[DW_ConnectionString].Properties[Value];\""Data Source=IpAddress;Initial Catalog=DWDB;Provider=SQLNCLI10.1;IntegratedSecurity=SSPI;"\"
I have defined the above command line configuration where I am attempting to pass override properties for the default connection string properties. The packages I'm targeting are not using package connections, but instead project level parameters/properties have been defined to store the DB connections.
For some reason I can't get this to work . I am getting an error message on the server saying
Failed to configure an overridden property that has the
following path: \Package.Variables
[DW_ConnectionString].Properties
[Value]. An error occurred while setting the value of
property "Value". The error returned is 0x80020009
Is my format correct for overriding properties?
The packages are hosted on a remote server
Try using DTEXECUI next time to generate your command string. It has places for all of the variables, connection managers etc. All you have to do is bring up your package and it fills everything in. You then enter any changes you want in the GUI then go to the Command line tab and it will give you the string to put after DTEXEC.EXEC. You can of course also run the package from DTEXECUI also.
It turns out that my format was wrong:
It's incorrect to use /Set Package Variable in this context:
The correct format is:
/Par "$Project::DW_ConnectionString";\""Data Source=Server\Instance;Initial Catalog=myDb;Provider=SQLNCLI11.1;Integrated Security=SSPI;AutoTranslate=False;"\"