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.2
## [2.0.2] - 2020-05-27 Added support for solution folders. Only bind the messenger when the VS editor is selected. Warn when unable to create the messenger. Fixed an initialization issue triggering legacy code generation. Allow package source in assembly to be generated when referenced from asmref.
This commit is contained in:
@@ -44,9 +44,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
|
||||
const string k_WindowsNewline = "\r\n";
|
||||
|
||||
string m_SolutionProjectEntryTemplate = string.Join("\r\n",
|
||||
@"Project(""{{{0}}}"") = ""{1}"", ""{2}"", ""{{{3}}}""",
|
||||
@"EndProject").Replace(" ", "\t");
|
||||
string m_SolutionProjectEntryTemplate = @"Project(""{{{0}}}"") = ""{1}"", ""{2}"", ""{{{3}}}""{4}EndProject";
|
||||
|
||||
string m_SolutionProjectConfigurationTemplate = string.Join("\r\n",
|
||||
@" {{{0}}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU",
|
||||
@@ -87,6 +85,8 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
m_AssemblyNameProvider = assemblyNameProvider;
|
||||
m_FileIOProvider = fileIoProvider;
|
||||
m_GUIDGenerator = guidGenerator;
|
||||
|
||||
SetupProjectSupportedExtensions();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -412,7 +412,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
projectBuilder.Append(@" <ItemGroup>").Append(k_WindowsNewline);
|
||||
foreach (string file in assembly.sourceFiles)
|
||||
{
|
||||
if (!ShouldFileBePartOfSolution(file))
|
||||
if (!IsSupportedFile(file))
|
||||
continue;
|
||||
|
||||
var extension = Path.GetExtension(file).ToLower();
|
||||
@@ -725,7 +725,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
const string vsversion = "15";
|
||||
|
||||
var relevantAssemblies = RelevantAssembliesForMode(assemblies);
|
||||
var generatedProjects = ToProjectEntries(relevantAssemblies);
|
||||
var generatedProjects = ToProjectEntries(relevantAssemblies).ToList();
|
||||
|
||||
SolutionProperties[] properties = null;
|
||||
|
||||
@@ -737,7 +737,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
// Add all projects that were previously in the solution and that are not generated by Unity, nor generated in the project root directory
|
||||
var externalProjects = previousSolution.Projects
|
||||
.Where(p => !FileUtility.IsFileInProjectDirectory(p.FileName))
|
||||
.Where(p => p.IsSolutionFolderProjectFactory() || !FileUtility.IsFileInProjectDirectory(p.FileName))
|
||||
.Where(p => generatedProjects.All(gp => gp.FileName != p.FileName));
|
||||
|
||||
projects.AddRange(externalProjects);
|
||||
@@ -746,7 +746,11 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
|
||||
string propertiesText = GetPropertiesText(properties);
|
||||
string projectEntriesText = GetProjectEntriesText(projects);
|
||||
string projectConfigurationsText = string.Join(k_WindowsNewline, projects.Select(p => GetProjectActiveConfigurations(p.ProjectGuid)).ToArray());
|
||||
|
||||
// do not generate configurations for SolutionFolders
|
||||
var configurableProjects = projects.Where(p => !p.IsSolutionFolderProjectFactory());
|
||||
string projectConfigurationsText = string.Join(k_WindowsNewline, configurableProjects.Select(p => GetProjectActiveConfigurations(p.ProjectGuid)).ToArray());
|
||||
|
||||
return string.Format(GetSolutionText(), fileversion, vsversion, projectEntriesText, projectConfigurationsText, propertiesText);
|
||||
}
|
||||
|
||||
@@ -800,7 +804,7 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
{
|
||||
var projectEntries = entries.Select(entry => string.Format(
|
||||
m_SolutionProjectEntryTemplate,
|
||||
entry.ProjectFactoryGuid, entry.Name, entry.FileName, entry.ProjectGuid
|
||||
entry.ProjectFactoryGuid, entry.Name, entry.FileName, entry.ProjectGuid, entry.Metadata
|
||||
));
|
||||
|
||||
return string.Join(k_WindowsNewline, projectEntries.ToArray());
|
||||
@@ -814,7 +818,8 @@ namespace Microsoft.Unity.VisualStudio.Editor
|
||||
ProjectFactoryGuid = SolutionGuid(assembly),
|
||||
Name = assembly.name,
|
||||
FileName = Path.GetFileName(ProjectFile(assembly)),
|
||||
ProjectGuid = ProjectGuid(assembly)
|
||||
ProjectGuid = ProjectGuid(assembly),
|
||||
Metadata = k_WindowsNewline
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user