-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run the MSBuildWorkspace tests on .Net Core #52064
Conversation
src/Workspaces/MSBuildTest/VisualStudioMSBuildWorkspaceTests.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/MSBuildTest/DotNetSdkMSBuildInstalled.LooseAssemblyVersionLoader.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/MSBuildTest/DotNetSdkMSBuildInstalled.LooseAssemblyVersionLoader.cs
Outdated
Show resolved
Hide resolved
src/Workspaces/MSBuildTest/DotNetSdkMSBuildInstalled.LooseAssemblyVersionLoader.cs
Outdated
Show resolved
Hide resolved
[DllImport("Microsoft.VisualStudio.Setup.Configuration.Native.dll", ExactSpelling = true, PreserveSig = true)] | ||
private static extern int GetSetupConfiguration( | ||
[MarshalAs(UnmanagedType.Interface), Out] out ISetupConfiguration configuration, | ||
IntPtr reserved); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very happy to see this going away!
src/Workspaces/MSBuildTest/VisualStudioMSBuildWorkspaceTests.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
[ConditionalFact(typeof(VisualStudioMSBuildInstalled)), Trait(Traits.Feature, Traits.Features.MSBuildWorkspace)] | ||
public async Task TestOpenProject_WithXaml() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this run on .NET 5, at least with some variations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried adding a test for this and the generated source files do not get added to the workspace. The compilation contains the following diagnostic.
error CS5001: Program does not contain a static 'Main' method suitable for an entry point
Perhaps the WPF on .NET core requires a particular target to be run...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what documentation says about migrating. Note the different outputtype, tfm, and Microsoft.Windows.Compatibility
reference (not sure if that's needed)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.2.211942">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
</ItemGroup>
</Project>
src/Workspaces/MSBuildTest/DotNetSdkMSBuildInstalled.LooseAssemblyVersionLoader.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
This PR superseded by #57613 |
No description provided.