You've already forked com.unity.ide.cursor
mirror of
https://github.com/boxqkrtm/com.unity.ide.cursor.git
synced 2026-05-14 22:30:10 +00:00
com.unity.ide.visualstudio@2.0.14
## [2.0.14] - 2022-01-14 Integration: - Remove package version checking. ## [2.0.13] - 2022-01-12 Integration: - Fixed wrong path to analyzers in generated projects when using external packages. - Fixed selective project generation not creating Analyzer/LangVersion nodes. - Fixed asmdef references with Player projects. Documentation: - Added new documentation including ToC, overview, how to use and images.
This commit is contained in:
@@ -100,6 +100,9 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
using (solutionSyncMarker.Auto())
|
||||
{
|
||||
// We need the exact VS version/capabilities to tweak project generation (analyzers/langversion)
|
||||
RefreshCurrentInstallation();
|
||||
|
||||
SetupProjectSupportedExtensions();
|
||||
|
||||
// See https://devblogs.microsoft.com/setup/configure-visual-studio-across-your-organization-with-vsconfig/
|
||||
@@ -527,9 +530,12 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
projectBuilder.Append(" <ItemGroup>").Append(k_WindowsNewline);
|
||||
foreach (var reference in assembly.assemblyReferences.Where(i => i.sourceFiles.Any(ShouldFileBePartOfSolution)))
|
||||
{
|
||||
projectBuilder.Append(" <ProjectReference Include=\"").Append(reference.name).Append(GetProjectExtension()).Append("\">").Append(k_WindowsNewline);
|
||||
projectBuilder.Append(" <Project>{").Append(ProjectGuid(reference)).Append("}</Project>").Append(k_WindowsNewline);
|
||||
projectBuilder.Append(" <Name>").Append(reference.name).Append("</Name>").Append(k_WindowsNewline);
|
||||
// If the current assembly is a Player project, we want to project-reference the corresponding Player project
|
||||
var referenceName = m_AssemblyNameProvider.GetAssemblyName(assembly.outputPath, reference.name);
|
||||
|
||||
projectBuilder.Append(" <ProjectReference Include=\"").Append(referenceName).Append(GetProjectExtension()).Append("\">").Append(k_WindowsNewline);
|
||||
projectBuilder.Append(" <Project>{").Append(ProjectGuid(referenceName)).Append("}</Project>").Append(k_WindowsNewline);
|
||||
projectBuilder.Append(" <Name>").Append(referenceName).Append("</Name>").Append(k_WindowsNewline);
|
||||
projectBuilder.Append(" </ProjectReference>").Append(k_WindowsNewline);
|
||||
}
|
||||
|
||||
@@ -741,16 +747,16 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
if (!string.IsNullOrEmpty(properties.RulesetPath))
|
||||
{
|
||||
lines.Add(@" <PropertyGroup>");
|
||||
lines.Add($" <CodeAnalysisRuleSet>{properties.RulesetPath.MakeAbsolutePath(ProjectDirectory).NormalizePathSeparators()}</CodeAnalysisRuleSet>");
|
||||
lines.Add($" <CodeAnalysisRuleSet>{properties.RulesetPath.MakeAbsolutePath().NormalizePathSeparators()}</CodeAnalysisRuleSet>");
|
||||
lines.Add(@" </PropertyGroup>");
|
||||
}
|
||||
|
||||
if (properties.Analyzers.Any())
|
||||
{
|
||||
lines.Add(@" <ItemGroup>");
|
||||
foreach (var analyzer in properties.Analyzers)
|
||||
foreach (var analyzer in properties.Analyzers.Distinct())
|
||||
{
|
||||
lines.Add($@" <Analyzer Include=""{analyzer.MakeAbsolutePath(ProjectDirectory).NormalizePathSeparators()}"" />");
|
||||
lines.Add($@" <Analyzer Include=""{analyzer.MakeAbsolutePath().NormalizePathSeparators()}"" />");
|
||||
}
|
||||
lines.Add(@" </ItemGroup>");
|
||||
}
|
||||
@@ -948,11 +954,14 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
return ".csproj";
|
||||
}
|
||||
|
||||
private string ProjectGuid(string assemblyName)
|
||||
{
|
||||
return m_GUIDGenerator.ProjectGuid(m_ProjectName, assemblyName);
|
||||
}
|
||||
|
||||
private string ProjectGuid(Assembly assembly)
|
||||
{
|
||||
return m_GUIDGenerator.ProjectGuid(
|
||||
m_ProjectName,
|
||||
m_AssemblyNameProvider.GetAssemblyName(assembly.outputPath, assembly.name));
|
||||
return ProjectGuid(m_AssemblyNameProvider.GetAssemblyName(assembly.outputPath, assembly.name));
|
||||
}
|
||||
|
||||
private string SolutionGuid(Assembly assembly)
|
||||
|
||||
Reference in New Issue
Block a user