I recently upgraded from VS2010 to VS2013 on our project.
When trying to run our web deploy I now receive this error:
"C:\G\ectc.proj" (Deploy target) (1) -> "C:\G\Source\Web\Web.csproj (ResolveReferences;_CopyWebApplicatio n target) (14:18) -> C:\g\Source\Web\Web.csproj : error MSB4057: The target "_CopyWeb Application" does not exist in the project.
It's strange, If i checkout the code before the upgrade and run the same build command which is:
msbuild ctc.proj /t:Deploy
It work's fine, But doesnt if i run the that command on the VS 2013 code base.
Thanks
Try pre-processing ctc.proj from the 2010 environment and the 2013 environment to determine which target files are missing, or what's occuring in the 2013 deployment and failing to resolve the targets file containing CopyWebApplication.
In the 2013 environment use:
msbuild ctc.proj /pp >2013.txt
In the 2010 environment use:
msbuild ctc.proj /pp >2013.txt
I'm guessing it's using an incorrect path to the target containing CopyWebApplications.
Related
I'm facing to an issue when I'm running my unit tests on a VSTS build.
When I'm launching all my tests on Visual Studio locally, everything works fine. No error at all. Perfect.
But when I'm launching my tests via a tests task on a VSTS build, I have this error:
An exception occurred while invoking executor
'executor://xunit/VsTestRunner2/uap': Could not load file or assembly
'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral,
PublicKeyToken=***********' or one of its dependencies. The
system cannot find the file specified.
My test project is set like this:
"xunit.runner.visualstudio" on version 2.4.0 with a "targetFramework" set to "net462" (set inside the packages.config)
.NET Framework 4.6.2
On the build server I have:
Visual Studio 2017, v15.7.5
Visual Studio 2015, v14.0
I'm running out of clues... I'm surely missing something...
Thanks for your help
PS:
All tests passed correctly on the VSTS build
On the settings of my build task, when I set "Test platform version" to "Visual Studio 2015", it works. But when I'm choosing "Visual Studio 2017" or "Latest" I have the same error...
EDIT
I have Nuget packages "FluentAssertions" v5.4.1 and "System.ValueTuple" v4.5.0. I already tried to downgrade one of them and both. It failed. But I saw that "FluentAssertions" has a dependency to "System.ValueTuple"
EDIT 2
As #PatrickLu-MSFT said, passing the vs test task version to 1 solved the issue.
But when I'm looking closely, the Test platform versions available are 2015 and 2013:
When I'm choosing VS test task version 2, I have those choices:
I would like to stay on vs test task version 2 (in case of future updates, I don't want to be stuck...). What I saw is when I'm on Test platform version set to "Latest" or "Visual Studio 2017", it does not work. When I'm choosing "Visual Studio 2015", it working...
So what I point is:
Having a vs test task version set to version 1 make it work (maybe because the latest test platform version is "Visual Studio 2015"...?)
Having a vs test task version set to version 2 with Test platform version set to "Visual Studio 2015" make it work
So:
A VS test task version set to version 1 seems to work the same way as a VS test task version set to version 2 with a "Test platform version" set to "Visual Studio 2015".
How can I make it work with a VS test task version set to version 2 and a "Test platform version" set to "Latest"?
EDIT 3
After connected remotely to the server of my build agent and run tests from VS2017, I compare the output of Visual Studio 2017 of the host server to the output of my local Visual Studio 2017:
Local Visual Studio 2017:
Remote Visual Studio 2017:
Are there some issues with "xUnit.net VSTest Adapter v2.4.0 (32-bit Universal Windows)" on the host?
I hit this same problem and solved it by changing the "Path to custom test adapters" to point specifically to the correct test adapter by setting it to "Source\packages\xunit.runner.visualstudio.2.4.0\build_common". (You should modify the path to account for where the packages folder is in your repository.)
This apparently happens because by default VSTS tries to be helpful and scans the entire working directory structure for test adapters and loads all of them, but the xUnit Visual Studio test adapter Nuget package installs test adaptors for .Net Core and UWP as well, so VSTS happily loads them and they blow up.
I created a PowerShell script to automate deployment for SSIS projects and used it in a custom TFS task. Within this task I used a msbuild step to build the SSIS project which keeps failing with this error:
Error MSB4067: The element DeploymentModel beneath element Project
is unrecognized.
I built the SSIS projects in visual studio 2015 just fine. I have tried msbuild version 12.0 and 15.0 and they both have the same error.
Thank you
When you build your SSIS projects via VS, actually is calling /Build (devenv.exe), not directly using MSBuild.
There is no build-in task that supports building via devenv.exe.Still in the backlog. More details please refer: "Visual Studio Build" build step that actually invokes devenv.com instead of msbuild?
As a workaround, you could try to use 3-party extension task SSIS Build & Deploy for now.
We are using Nuget Installer step that restores the missing nuget packages in TFS build, this step fails with the following error:
E:\Builds\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe restore -NonInteractive E:\Builds\test.sln
MSBuild auto-detection: using msbuild version '3.5' from 'C:\Windows\Microsoft.NET\Framework\v3.5'.
Error parsing solution file at E:\Builds\test.sln: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
Error: E:\Builds\Agent2017Update1_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.29\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe failed with return code: 1
Packages failed to install
The error message seems to be confusing as the file specified is present on build agent.
TFS build agent version:2.112.0
TFS version: TFS 2017 update 1
In the Advanced options change the version to 3.5 for NuGet. I've been having weird issues the last 2 weeks where 3.3 would do similar to what you are experiencing and switching to 3.5 works as expected.
Hope this works for you as well =D
This seems to be due to the fact that the msbuild.exe in your path (your build agent) is version 3.5. MSBuild 3.5 does not have two .dll's that nuget are attempting to load dynamically (Microsoft.Build.dll and Microsoft.Build.Framework.dll).
A solution to fix this issue, please make sure NuGet.exe uses MSBuild
4.0 or higher. This can be done by making sure MSBuild 4.0 or higher is the first to resolve in your path or by passing the -msbuildversion
option. For example, use MSBuild 14.0 (which shipped with Visual
Studio 2015).
nuget.exe pack MyProj.csproj -msbuildversion 14.0
More details please refer this similar issue nuget pack fails when MSBuild version resolved to MSBuild 3.5
I am trying to configure my visual studio project to send some scan data to SonarQube server using TFS 2015 build (vnext)
I get this error in the Sonar end task.
##[error]No ProjectInfo.xml files were found. Possible causes:
##[error]1. The project has not been built
The end step was called right after the begin step, without a build step in between an unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported.
We use MSBuild 14.0 in the server. it is a C++ project (VCXPROJ project File)
We have TFS 2010 running happily on a dedicated build server.
I have installed Microsoft Build Tools 2015, which includes MS Build 14 successfully on the build machine, but not Visual Studio 2015.
I've created a custom template which alters the "ToolsPath" property of the "Run MSBuild" activity to "C:\Program Files (x86)\MSBuild\14.0\Bin".
The build runs, but fails on this particular error:
(CoreCompile target) ->
CSC : error CS1566: Error reading resource 'ProjectName.exe.licenses' --
'Could not find file 'C:\develop\Sources\ProjectName\obj\x86\Release\ProjectName.exe.licenses'.' [C:\develop\Sources\ProjectName\ProjectName.csproj]
The same project builds fine using Visual Studio 2015 running from another machine.
It makes no difference whether the TFS build definition includes these MS Build arguments or not:
/tv:14.0 /p:VisualStudioVersion=14.0
Does anybody have a success story of using a TFS 2010 build agent to successfully build a C#6.0 project?
I solved this in the end by installing Visual Studio 2015!
The /tv:14.0 /p:VisualStudioVersion=14.0 argument may don't work for MSBuild Tools.
You should customize the tfs build process template to set ToolPath of the Run MSBuild for Project to target to MSBuild14; and set ToolVersion to "14.0".
Check this link for the detailed information:BuildActivity ignores ToolsVersion