Closed acesiddhu closed 7 years ago
We are seeing exactly the same problem. Setting VisualStudioVersion property to 15.0
in the msbuild call seems to fix the problem.
It seems like for normal csproj or vbproj projects the VisualStudioVersion get's set through the Microsoft.Common.props
. This is normally imported as first project in csproj or vbproj files by: <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
Unfortunately our csproj which contains the codedui test code doesn't have this imported. Also creating a new coded ui project from the "Add Project Wizard" doesn't add this import.
Does someone know if this is a bug in the template für coded ui test projects? Importing the Microsoft.Common.props
for coded ui test projects seems to fix the problem. But I have no clue if this breaks something else.
@rainersigwald do you know if it would be safe to import Microsoft.Common.props
for coded ui projects?
@stffabi you can add the import. it wont have any issues.
This is a duplicate of #1678 but has more detailed information, so I'm going to leave both open for now.
Fixed by #2258.
When will this be released?
@mgolois It's in our master
branch, which is targeted at the next "big" update of Visual Studio 2017. No release date has been announced for that yet.
@rainersigwald any workaround other than using Developer Command Prompt for 2017?
Microsoft.Common.props
at the top of your projects https://github.com/Microsoft/msbuild/issues/2117#issuecomment-311056514.VisualStudioVersion
property in the MSBuild invocation https://github.com/Microsoft/msbuild/issues/2117#issuecomment-309761170.@rainersigwald Thank you!
@rainersigwald , sorry, I was able to use the command Prompt VS2017 and the VisualStudioVersion property, but I was unable to import Microsoft.Common.props I put this at the top of my proj file:
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
I got this error:
: error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\4.0\Microsoft.Common.props" was not found. Confirm that the path in the
I am running VS Studio 2015 with MS Build 14.0 . I am successfully building my CodedUI project through MSBuild, but when trying to add my test with TCM so that they can be accessed by MTM, it says 'no tests were found', However when I build the .dll using Visual Studio, TCM can find the Tests. Are there some flags in the build command that are missing?
With msbuild 15.0 we are seeing that coded ui test projects doesn’t build if we use a normal command prompt. This used to work with msbuild 14.0.
Here is a repro
1) Unzip attached coded ui test zip on local machine CodedUITestProject2.zip
2) Run c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe " CodedUITestProject2.sln" or codeduitestproject.csproj (use normal command prompt and not developer command prompt)
Ideally the project should have been build. We tried same steps with msbuild 14 and it works fine
After investigation we saw that the csproj takes a dependency for “VisualStudioVersion”. We see that this value is null when building with msbuild 15.0. Other point to note is that .sln defines “VisualStudioVersion = 15.0.26228.9”. shouldn’t this just work?