Skip to content

Commit 700b440

Browse files
sailroPackage Release Automation
authored andcommitted
Integration: - Add support for `XDG_DATA_DIRS` and `.desktop` files on Linux for `VS Code` discovery. - Use compile-time platform-specifics instead of using runtime conditions. Project generation: - Suppress `USG0001` warnings. - Mark referenced assemblies as private (to not copy extra files to output directory when building). - Add Unity capability to SDK-Style projects. - Prevent circular dependency errors with SDK-Style projects.
2 parents d9a0333 + b4cdb07 commit 700b440

16 files changed

+240
-99
lines changed

Packages/com.unity.ide.visualstudio.tests/Tests/Editor/AssemblyNameProviderTests.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ public void SetUp()
3030
m_AssemblyNameProvider.ResetProjectGenerationFlag();
3131
}
3232

33-
[TestCase(@"Temp\Bin\Debug\", "AssemblyName", "AssemblyName")]
34-
[TestCase(@"Temp\Bin\Debug\", "My.Player.AssemblyName", "My.Player.AssemblyName")]
35-
[TestCase(@"Temp\Bin\Debug\", "AssemblyName.Player", "AssemblyName.Player")]
36-
[TestCase(@"Temp\Bin\Debug\Player\", "AssemblyName", "AssemblyName.Player")]
37-
[TestCase(@"Temp\Bin\Debug\Player\", "AssemblyName.Player", "AssemblyName.Player.Player")]
33+
[TestCase(@"Temp\bin\Debug\", "AssemblyName", "AssemblyName")]
34+
[TestCase(@"Temp\bin\Debug\", "My.Player.AssemblyName", "My.Player.AssemblyName")]
35+
[TestCase(@"Temp\bin\Debug\", "AssemblyName.Player", "AssemblyName.Player")]
36+
[TestCase(@"Temp\bin\Debug\Player\", "AssemblyName", "AssemblyName.Player")]
37+
[TestCase(@"Temp\bin\Debug\Player\", "AssemblyName.Player", "AssemblyName.Player.Player")]
3838
public void GetOutputPath_ReturnsPlayerAndeditorOutputPath(string assemblyOutputPath, string assemblyName, string expectedAssemblyName)
3939
{
40-
Assert.AreEqual(expectedAssemblyName, m_AssemblyNameProvider.GetAssemblyName(assemblyOutputPath, assemblyName));
40+
Assert.AreEqual(expectedAssemblyName, m_AssemblyNameProvider.GetAssemblyName(assemblyOutputPath.NormalizePathSeparators(), assemblyName));
4141
}
4242

4343
[Test]
@@ -49,7 +49,7 @@ public void AllEditorAssemblies_AreCollected()
4949

5050
foreach (Assembly editorAssembly in editorAssemblies)
5151
{
52-
Assert.IsTrue(collectedAssemblies.Any(assembly => assembly.name == editorAssembly.name && assembly.outputPath == @"Temp\Bin\Debug\"), $"{editorAssembly.name}: was not found in collection.");
52+
Assert.IsTrue(collectedAssemblies.Any(assembly => assembly.name == editorAssembly.name && assembly.outputPath == AssemblyNameProvider.AssemblyOutput), $"{editorAssembly.name}: was not found in collection.");
5353
}
5454
}
5555

@@ -91,7 +91,7 @@ public void PlayerAssemblies_AreNotCollected_BeforeToggling()
9191

9292
foreach (Assembly playerAssembly in playerAssemblies)
9393
{
94-
Assert.IsFalse(collectedAssemblies.Any(assembly => assembly.name == playerAssembly.name && assembly.outputPath == @"Temp\Bin\Debug\Player\"), $"{playerAssembly.name}: was found in collection.");
94+
Assert.IsFalse(collectedAssemblies.Any(assembly => assembly.name == playerAssembly.name && assembly.outputPath == AssemblyNameProvider.PlayerAssemblyOutput), $"{playerAssembly.name}: was found in collection.");
9595
}
9696
}
9797

@@ -106,7 +106,7 @@ public void AllPlayerAssemblies_AreCollected_AfterToggling()
106106

107107
foreach (Assembly playerAssembly in playerAssemblies)
108108
{
109-
Assert.IsTrue(collectedAssemblies.Any(assembly => assembly.name == playerAssembly.name && assembly.outputPath == @"Temp\Bin\Debug\Player\"), $"{playerAssembly.name}: was not found in collection.");
109+
Assert.IsTrue(collectedAssemblies.Any(assembly => assembly.name == playerAssembly.name && assembly.outputPath == AssemblyNameProvider.PlayerAssemblyOutput), $"{playerAssembly.name}: was not found in collection.");
110110
}
111111
}
112112

Packages/com.unity.ide.visualstudio.tests/Tests/Editor/CSProjectTests.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ public void DefaultSyncSettings_WhenSynced_CreatesProjectFileFromDefaultTemplate
150150
$" <DefineConstants></DefineConstants>",
151151
" <ErrorReport>prompt</ErrorReport>",
152152
" <WarningLevel>4</WarningLevel>",
153-
" <NoWarn>0169</NoWarn>",
153+
" <NoWarn>0169;USG0001</NoWarn>",
154154
" <AllowUnsafeBlocks>False</AllowUnsafeBlocks>",
155155
" </PropertyGroup>",
156156
" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">",
157157
" <DebugType>pdbonly</DebugType>",
158158
" <Optimize>true</Optimize>",
159-
" <OutputPath>Temp\\bin\\Release\\</OutputPath>",
159+
$" <OutputPath>{@"Temp\bin\Release\".NormalizePathSeparators()}</OutputPath>",
160160
" <ErrorReport>prompt</ErrorReport>",
161161
" <WarningLevel>4</WarningLevel>",
162-
" <NoWarn>0169</NoWarn>",
162+
" <NoWarn>0169;USG0001</NoWarn>",
163163
" <AllowUnsafeBlocks>False</AllowUnsafeBlocks>",
164164
" </PropertyGroup>",
165165
" <PropertyGroup>",
@@ -173,6 +173,7 @@ public void DefaultSyncSettings_WhenSynced_CreatesProjectFileFromDefaultTemplate
173173
" <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>",
174174
" <UnityProjectGenerator>Package</UnityProjectGenerator>",
175175
$" <UnityProjectGeneratorVersion>{packageVersion}</UnityProjectGeneratorVersion>",
176+
" <UnityProjectGeneratorStyle>Legacy</UnityProjectGeneratorStyle>",
176177
$" <UnityProjectType>{buildTarget}</UnityProjectType>",
177178
$" <UnityBuildTarget>{EditorUserBuildSettings.activeBuildTarget + ":" + (int)EditorUserBuildSettings.activeBuildTarget}</UnityBuildTarget>",
178179
$" <UnityVersion>{unityVersion}</UnityVersion>",
@@ -182,7 +183,7 @@ public void DefaultSyncSettings_WhenSynced_CreatesProjectFileFromDefaultTemplate
182183
" </ItemGroup>",
183184
" <ItemGroup>",
184185
" </ItemGroup>",
185-
" <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />",
186+
$" <Import Project=\"{@"$(MSBuildToolsPath)\Microsoft.CSharp.targets".NormalizePathSeparators()}\" />",
186187
" <Target Name=\"GenerateTargetFrameworkMonikerAttribute\" />",
187188
" <!-- To modify your build process, add your task inside one of the targets below and uncomment it.",
188189
" Other similar extension points exist, see Microsoft.Common.targets.",
@@ -906,7 +907,7 @@ public void DllInSourceFiles_WillBeAddedAsReference()
906907
XmlDocument scriptProject = XMLUtilities.FromText(csprojFileContents);
907908
XMLUtilities.AssertCompileItemsMatchExactly(scriptProject, new[] { "file.cs" });
908909
XMLUtilities.AssertNonCompileItemsMatchExactly(scriptProject, new string[0]);
909-
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"reference\">\\W*<HintPath>{referenceDll}\\W*</HintPath>\\W*</Reference>"));
910+
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"reference\">\\W*<HintPath>{referenceDll}\\W*</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
910911
}
911912

912913
[Test]
@@ -921,7 +922,7 @@ public void Containing_PathWithSpaces_IsParsedCorrectly()
921922
synchronizer.Sync();
922923

923924
var csprojFileContents = m_Builder.ReadProjectFile(m_Builder.Assembly);
924-
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"Goodbye\">\\W*<HintPath>{Regex.Escape(fullPathReferences[0].ReplaceDirectorySeparators())}\\W*</HintPath>\\W*</Reference>"));
925+
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"Goodbye\">\\W*<HintPath>{Regex.Escape(fullPathReferences[0].ReplaceDirectorySeparators())}\\W*</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
925926
}
926927

927928
[Test]
@@ -950,8 +951,8 @@ public void Multiple_AreAdded()
950951

951952
var csprojFileContents = m_Builder.ReadProjectFile(m_Builder.Assembly);
952953

953-
Assert.IsTrue(csprojFileContents.MatchesRegex("<Reference Include=\"Hello\">\\W*<HintPath>Hello.dll</HintPath>\\W*</Reference>"));
954-
Assert.IsTrue(csprojFileContents.MatchesRegex("<Reference Include=\"MyPlugin\">\\W*<HintPath>MyPlugin.dll</HintPath>\\W*</Reference>"));
954+
Assert.IsTrue(csprojFileContents.MatchesRegex("<Reference Include=\"Hello\">\\W*<HintPath>Hello.dll</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
955+
Assert.IsTrue(csprojFileContents.MatchesRegex("<Reference Include=\"MyPlugin\">\\W*<HintPath>MyPlugin.dll</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
955956
}
956957

957958
[Test]
@@ -988,8 +989,8 @@ public void AssemblyReferenceFromInternalizedPackage_IsAddedAsReference()
988989
var csprojFileContents = m_Builder.ReadProjectFile(m_Builder.Assembly);
989990
Assert.That(csprojFileContents, Does.Not.Match($@"<ProjectReference Include=""{assemblyReferences[0].name}\.csproj"">[\S\s]*?</ProjectReference>"));
990991
Assert.That(csprojFileContents, Does.Not.Match($@"<ProjectReference Include=""{assemblyReferences[1].name}\.csproj"">[\S\s]*?</ProjectReference>"));
991-
Assert.That(csprojFileContents, Does.Match($"<Reference Include=\"{assemblyReferences[0].name}\">\\W*<HintPath>{Regex.Escape(assemblyReferences[0].outputPath.ReplaceDirectorySeparators())}</HintPath>\\W*</Reference>"));
992-
Assert.That(csprojFileContents, Does.Match($"<Reference Include=\"{assemblyReferences[1].name}\">\\W*<HintPath>{Regex.Escape(assemblyReferences[1].outputPath.ReplaceDirectorySeparators())}</HintPath>\\W*</Reference>"));
992+
Assert.That(csprojFileContents, Does.Match($"<Reference Include=\"{assemblyReferences[0].name}\">\\W*<HintPath>{Regex.Escape(assemblyReferences[0].outputPath.ReplaceDirectorySeparators())}</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
993+
Assert.That(csprojFileContents, Does.Match($"<Reference Include=\"{assemblyReferences[1].name}\">\\W*<HintPath>{Regex.Escape(assemblyReferences[1].outputPath.ReplaceDirectorySeparators())}</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
993994
}
994995

995996
[Test]
@@ -1005,8 +1006,8 @@ public void CompiledAssemblyReference_IsAdded()
10051006
synchronizer.Sync();
10061007

10071008
var csprojFileContents = m_Builder.ReadProjectFile(m_Builder.Assembly);
1008-
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"Hello\">\\W*<HintPath>{Regex.Escape(compiledAssemblyReferences[0])}</HintPath>\\W*</Reference>"));
1009-
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"MyPlugin\">\\W*<HintPath>{Regex.Escape(compiledAssemblyReferences[1])}</HintPath>\\W*</Reference>"));
1009+
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"Hello\">\\W*<HintPath>{Regex.Escape(compiledAssemblyReferences[0])}</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
1010+
Assert.IsTrue(csprojFileContents.MatchesRegex($"<Reference Include=\"MyPlugin\">\\W*<HintPath>{Regex.Escape(compiledAssemblyReferences[1])}</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
10101011
}
10111012

10121013
[Test]
@@ -1018,7 +1019,7 @@ public void ProjectReference_FromLibraryReferences_IsAdded()
10181019
synchronizer.Sync();
10191020

10201021
var csprojFileContents = m_Builder.ReadProjectFile(m_Builder.Assembly);
1021-
Assert.IsFalse(csprojFileContents.MatchesRegex($"<Reference Include=\"{projectAssembly.name}\">\\W*<HintPath>{Regex.Escape(projectAssembly.outputPath.ReplaceDirectorySeparators())}</HintPath>\\W*</Reference>"));
1022+
Assert.IsFalse(csprojFileContents.MatchesRegex($"<Reference Include=\"{projectAssembly.name}\">\\W*<HintPath>{Regex.Escape(projectAssembly.outputPath.ReplaceDirectorySeparators())}</HintPath>\\W*<Private>False</Private>\\W*</Reference>"));
10221023
}
10231024

10241025
[Test]

Packages/com.unity.ide.visualstudio.tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "com.unity.ide.visualstudio.tests",
44
"displayName": "Visual Studio Editor",
55
"description": "Code editor integration for supporting Visual Studio as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc.",
6-
"version": "2.0.20",
6+
"version": "2.0.22",
77
"unity": "2019.4",
88
"unityRelease": "25f1",
99
"dependencies": {

Packages/com.unity.ide.visualstudio/CHANGELOG.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Code Editor Package for Visual Studio
22

3+
## [2.0.22] - 2023-10-03
4+
5+
Integration:
6+
7+
- Add support for `XDG_DATA_DIRS` and `.desktop` files on Linux for `VS Code` discovery.
8+
- Use compile-time platform-specifics instead of using runtime conditions.
9+
10+
Project generation:
11+
12+
- Suppress `USG0001` warnings.
13+
- Mark referenced assemblies as private (to not copy extra files to output directory when building).
14+
- Add Unity capability to SDK-Style projects.
15+
- Prevent circular dependency errors with SDK-Style projects.
16+
17+
18+
## [2.0.21] - 2023-09-05
19+
20+
Integration:
21+
22+
- Only disable the legacy `com.unity.ide.vscode` package going forward.
23+
- Fix json parsing issues with specific non-UTF code pages.
24+
25+
Project generation:
26+
27+
- Target `netstandard2.1` instead of `netstandard2.0`.
28+
- Set `defaultSolution` in `settings.json`.
29+
- Remove `files.exclude` entries for root `csproj` and `sln` files in `settings.json` when needed.
30+
- Add `vstuc` launch configuration to `launch.json` when needed.
31+
- Add `visualstudiotoolsforunity.vstuc` entry to `extensions.json` when needed.
32+
- You can prevent the package from patching those configuration files by creating a `.vscode/.vstupatchdisable` file.
33+
334
## [2.0.20] - 2023-06-27
435

536
Integration:
@@ -131,7 +162,7 @@ Documentation:
131162

132163
Integration:
133164

134-
- Remove com.unity.nuget.newtonsoft-json dependency in favor of the built-in JsonUtility for the VS Test Runner.
165+
- Remove `com.unity.nuget.newtonsoft-json` dependency in favor of the built-in JsonUtility for the VS Test Runner.
135166

136167
## [2.0.6] - 2021-01-20
137168

@@ -169,7 +200,7 @@ Integration:
169200
Project generation:
170201

171202
- Added C#8 language support.
172-
- Added UnityProjectGeneratorVersion property.
203+
- Added `UnityProjectGeneratorVersion` property.
173204
- Local and Embedded packages are now selected by default for generation.
174205
- Added support for asmdef root namespace.
175206

@@ -191,7 +222,7 @@ Integration:
191222
## [2.0.1] - 2020-03-19
192223

193224
- When Visual Studio installation is compatible with C# 8.0, setup the language version to not prompt the user with unsupported constructs. (So far Unity only supports C# 7.3).
194-
- Use Unity's TypeCache to improve project generation speed.
225+
- Use Unity's `TypeCache` to improve project generation speed.
195226
- Properly check for a managed assembly before displaying a warning regarding legacy PDB usage.
196227
- Add support for selective project generation (embedded, local, registry, git, builtin, player).
197228

@@ -241,8 +272,8 @@ Integration:
241272

242273
## [1.0.4] - 2019-04-12
243274

244-
- Fixing null reference issue for callbacks to AssetPostProcessor.
245-
- Ensure Path.GetFullPath does not get an empty string.
275+
- Fixing null reference issue for callbacks to `AssetPostProcessor`.
276+
- Ensure `Path.GetFullPath` does not get an empty string.
246277

247278
## [1.0.3] - 2019-01-01
248279

Packages/com.unity.ide.visualstudio/Editor/Discovery.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ internal static class Discovery
1313
{
1414
public static IEnumerable<IVisualStudioInstallation> GetVisualStudioInstallations()
1515
{
16+
#if UNITY_EDITOR_WIN
1617
foreach (var installation in VisualStudioForWindowsInstallation.GetVisualStudioInstallations())
1718
yield return installation;
18-
19+
#elif UNITY_EDITOR_OSX
1920
foreach (var installation in VisualStudioForMacInstallation.GetVisualStudioInstallations())
2021
yield return installation;
22+
#endif
2123

2224
foreach (var installation in VisualStudioCodeInstallation.GetVisualStudioInstallations())
2325
yield return installation;
@@ -27,12 +29,13 @@ public static bool TryDiscoverInstallation(string editorPath, out IVisualStudioI
2729
{
2830
try
2931
{
32+
#if UNITY_EDITOR_WIN
3033
if (VisualStudioForWindowsInstallation.TryDiscoverInstallation(editorPath, out installation))
3134
return true;
32-
35+
#elif UNITY_EDITOR_OSX
3336
if (VisualStudioForMacInstallation.TryDiscoverInstallation(editorPath, out installation))
3437
return true;
35-
38+
#endif
3639
if (VisualStudioCodeInstallation.TryDiscoverInstallation(editorPath, out installation))
3740
return true;
3841
}
@@ -46,8 +49,11 @@ public static bool TryDiscoverInstallation(string editorPath, out IVisualStudioI
4649

4750
public static void Initialize()
4851
{
52+
#if UNITY_EDITOR_WIN
4953
VisualStudioForWindowsInstallation.Initialize();
54+
#elif UNITY_EDITOR_OSX
5055
VisualStudioForMacInstallation.Initialize();
56+
#endif
5157
VisualStudioCodeInstallation.Initialize();
5258
}
5359
}

Packages/com.unity.ide.visualstudio/Editor/Messaging/UdpSocket.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public void Bind(IPAddress address, int port = 0)
2727

2828
private void SetIOControl()
2929
{
30-
if (!VisualStudioEditor.IsWindows)
31-
return;
32-
30+
#if UNITY_EDITOR_WIN
3331
try
3432
{
3533
const int SIO_UDP_CONNRESET = -1744830452;
@@ -40,6 +38,7 @@ private void SetIOControl()
4038
{
4139
// fallback
4240
}
41+
#endif
4342
}
4443

4544
public static byte[] BufferFor(IAsyncResult result)

Packages/com.unity.ide.visualstudio/Editor/ProjectGeneration/AssemblyNameProvider.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,18 @@ public string GetAssemblyNameFromScriptPath(string path)
6161
return CompilationPipeline.GetAssemblyNameFromScriptPath(path);
6262
}
6363

64+
internal static readonly string AssemblyOutput = @"Temp\bin\Debug\".NormalizePathSeparators();
65+
internal static readonly string PlayerAssemblyOutput = @"Temp\bin\Debug\Player\".NormalizePathSeparators();
66+
6467
public IEnumerable<Assembly> GetAssemblies(Func<string, bool> shouldFileBePartOfSolution)
6568
{
66-
IEnumerable<Assembly> assemblies = GetAssembliesByType(AssembliesType.Editor, shouldFileBePartOfSolution, @"Temp\Bin\Debug\");
69+
IEnumerable<Assembly> assemblies = GetAssembliesByType(AssembliesType.Editor, shouldFileBePartOfSolution, AssemblyOutput);
6770

6871
if (!ProjectGenerationFlag.HasFlag(ProjectGenerationFlag.PlayerAssemblies))
6972
{
7073
return assemblies;
7174
}
72-
var playerAssemblies = GetAssembliesByType(AssembliesType.Player, shouldFileBePartOfSolution, @"Temp\Bin\Debug\Player\");
75+
var playerAssemblies = GetAssembliesByType(AssembliesType.Player, shouldFileBePartOfSolution, PlayerAssemblyOutput);
7376
return assemblies.Concat(playerAssemblies);
7477
}
7578

@@ -98,7 +101,8 @@ private static IEnumerable<Assembly> GetAssembliesByType(AssembliesType type, Fu
98101

99102
public string GetCompileOutputPath(string assemblyName)
100103
{
101-
return assemblyName.EndsWith(".Player", StringComparison.Ordinal) ? @"Temp\Bin\Debug\Player\" : @"Temp\Bin\Debug\";
104+
// We need to keep this one for API surface check (AssemblyNameProvider is public), but not used anymore
105+
throw new NotImplementedException();
102106
}
103107

104108
public IEnumerable<string> GetAllAssetPaths()
@@ -207,7 +211,10 @@ public void ResetProjectGenerationFlag()
207211

208212
public string GetAssemblyName(string assemblyOutputPath, string assemblyName)
209213
{
210-
return assemblyOutputPath.EndsWith(@"\Player\", StringComparison.Ordinal) ? assemblyName + ".Player" : assemblyName;
214+
if (assemblyOutputPath == PlayerAssemblyOutput)
215+
return assemblyName + ".Player";
216+
217+
return assemblyName;
211218
}
212219
}
213220
}

Packages/com.unity.ide.visualstudio/Editor/ProjectGeneration/LegacyStyleProjectGeneration.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace Microsoft.Unity.VisualStudio.Editor
1212

1313
internal class LegacyStyleProjectGeneration : ProjectGeneration
1414
{
15+
internal override string StyleName => "Legacy";
16+
1517
public LegacyStyleProjectGeneration(string tempDirectory, IAssemblyNameProvider assemblyNameProvider, IFileIO fileIoProvider, IGUIDGenerator guidGenerator) : base(tempDirectory, assemblyNameProvider, fileIoProvider, guidGenerator)
1618
{
1719
}
@@ -82,7 +84,7 @@ internal override void AppendProjectReference(Assembly assembly, Assembly refere
8284
internal override void GetProjectFooter(StringBuilder footerBuilder)
8385
{
8486
footerBuilder.Append(string.Join(k_WindowsNewline,
85-
@" <Import Project=""$(MSBuildToolsPath)\Microsoft.CSharp.targets"" />",
87+
$" <Import Project=\"{@"$(MSBuildToolsPath)\Microsoft.CSharp.targets".NormalizePathSeparators()}\" />",
8688
@" <Target Name=""GenerateTargetFrameworkMonikerAttribute"" />",
8789
@" <!-- To modify your build process, add your task inside one of the targets below and uncomment it.",
8890
@" Other similar extension points exist, see Microsoft.Common.targets.",

0 commit comments

Comments
 (0)