From efd8d0d29b8aae1e9de23ce04c796486daecd47b Mon Sep 17 00:00:00 2001 From: Manodasan Wignarajah Date: Fri, 29 Jan 2021 16:08:57 -0800 Subject: [PATCH] Reduce properties required to be set for authoring (#710) * Remove the need for some properties to be set. * Fix winmd location --- nuget/Microsoft.Windows.CsWinRT.targets | 6 +++--- src/Authoring/WinRT.SourceGenerator/Generator.cs | 3 +-- src/Tests/AuthoringTest/AuthoringTest.csproj | 8 ++------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/nuget/Microsoft.Windows.CsWinRT.targets b/nuget/Microsoft.Windows.CsWinRT.targets index cd0098aa4..f479dfd35 100644 --- a/nuget/Microsoft.Windows.CsWinRT.targets +++ b/nuget/Microsoft.Windows.CsWinRT.targets @@ -122,7 +122,7 @@ $(CsWinRTFilters) - + @@ -131,7 +131,7 @@ $(CsWinRTFilters) - + $(CsWinRTAuthoringInputs) @(CsWinRTInputs->'"%(FullPath)"', ' ') @(CsWinRTAuthoringWinMDs->'"%(FullPath)"', ' ') @@ -141,7 +141,7 @@ $(CsWinRTFilters) - + diff --git a/src/Authoring/WinRT.SourceGenerator/Generator.cs b/src/Authoring/WinRT.SourceGenerator/Generator.cs index 321675c1a..800a75e5e 100644 --- a/src/Authoring/WinRT.SourceGenerator/Generator.cs +++ b/src/Authoring/WinRT.SourceGenerator/Generator.cs @@ -44,8 +44,7 @@ private static string GetAssemblyVersion(GeneratorExecutionContext context) internal static string GetGeneratedFilesDir(GeneratorExecutionContext context) { - // TODO: determine correct location to write to. - context.AnalyzerConfigOptions.GlobalOptions.TryGetValue("build_property.GeneratedFilesDir", out var generatedFilesDir); + context.AnalyzerConfigOptions.GlobalOptions.TryGetValue("build_property.CsWinRTGeneratedFilesDir", out var generatedFilesDir); Directory.CreateDirectory(generatedFilesDir); return generatedFilesDir; } diff --git a/src/Tests/AuthoringTest/AuthoringTest.csproj b/src/Tests/AuthoringTest/AuthoringTest.csproj index 4b803e1d9..fb1fd1db2 100644 --- a/src/Tests/AuthoringTest/AuthoringTest.csproj +++ b/src/Tests/AuthoringTest/AuthoringTest.csproj @@ -3,13 +3,9 @@ net5.0 x64;x86 - preview - 1.0.0.0 - true true - true - $([MSBuild]::NormalizeDirectory('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)', 'Generated Files')) + @@ -23,7 +19,7 @@ - +