I have command like this
msbuild /t:pack Test.csproj /p:Authors="Test"
Getting error :
Id is required
Why is not use $(AssemblyName)? And how to fix It?
Related
We are using msbuild command to restore nuget but package is not restoring with jenkins build.please find the following command.
please suggest solutions.also please suggest if any other way to achive it.Thanks in advance.
Initially i updated package documentformat.openxml to 2.11.1 and the build is success but when i update the same package to 2.11.3 if has thrown following exception.After that i tried updating some other package also but not updated and thrown same kind of exception as below.Please help.
The TFS instance I am working on was recently upgraded from TFS 2017 Update 1 to TFS 2018 Update 2, allowing me to change the dotnet task version used in my build definitions from 0.* to 2.*.
In doing so, the dotnet test step no longer works, returning the following error:
MSBUILD : error MSB1008: Only one project can be specified.
Switch: trx
The command it runs is:
C:\Program Files\dotnet\dotnet.exe" test <Agent_WorkFolder>\1\w\3\s\source\MySolution\MyProject.csproj --configuration release --logger trx --logger trx --results-directory <Agent_WorkFolder>\1\w\_temp
The parameters given to the task are:
Paths to projects = **\*Tests*.csproj
Arguments = --configuration $(BuildConfiguration) --logger trx
Reverting the task version back to 0.*, and it runs again. What is causing this error?
The problem is caused by --logger trx being specified in the Arguments to the task. The newer versions of the task automatically adds this switch when executing the dotnet test command as its the output which TFS supports for reading test results. The extra argument results in the switch being given twice, so whilst MSBUILD error is unhelpful, the Switch: trx part gives a clue as to what is the problem.
Removing the switch from the arguments resolved the problem.
I have an MSBuild project file to deploy a windows service.
While trying to start the service after the files are copied over, the command returns the
following error:
error : Start Service failed with return code '[2] AccessDenied'
I used the following ways to achieve this but all return the same error:
MSBuild ServiceController
MSBuild.ExtensionPack.Computer.WindowsService Exec Command="net
start $(WindowsServiceName)"
Thanks.
we are trying to execute unit tests with MSTest from command line and publishing the results at the TFS server. The problem is that MSTest is always returning:
Publishing results of test run buildmachine#XXX-XXXXXXX 2010-12-16 11:39:13_Release_Any
CPU to http://xxxx:8080/Build/v1.0/PublishTestResultsBuildService2.asmx...
.........................................................................................
Build 'xxx>xxx>x>x>x>xxxx>xxxx>x.x.x.xxx' does not include the specified
configuration ('Release/Any CPU').
The problem is that the specified configuration should exist. We've build with the next MSBuild settings:
<ConfigurationToBuild Include="Release|Any CPU">
<FlavorToBuild>Release</FlavorToBuild>
<PlatformToBuild>Any CPU</PlatformToBuild>
</ConfigurationToBuild>
Any idea? I'm starting to be fed up with this.
The problem was that the build didn't succeeded and then MSTest couldn't publish the results. The error message could be better ...
I have a .NET project with a Rake build script. Rake calls msbuild.exe to do the actual compilation. When I configure a TeamCity 5.0 build using the Rake runner, compilation errors are not recognized as such by TC. When a compilation error occurs:
The build does abort and is flagged as a failure;
The log overview does not contain the compilation error message. I have to go to Build Log -> All Messages to see the failure;
The compilation failure is not reported via email. The {COMPILATION_ERRORS} placeholder in my email notification template is replaced with a blank string.
What do I have to do to get TC to recognize the compilation errors?
The answer, as shown in this thread on the TeamCity support forum, is to tell MSBuild to use a special TeamCity log listener using the "/l" switch:
msbuild /l:JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,<path to dll>
The dll ships in the TeamCity agent directory: {agent}/plugins/dotnetplugin/bin/JetBrains.BuildServer.MSBuildLoggers.dll