Skip to content

Commit

Permalink
fix: Adjust wizard for VS 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed May 13, 2022
1 parent ac9d765 commit 464c34e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
<PackageReference Include="Newtonsoft.Json" version="12.0.3" />
<PackageReference Include="NuGet.VisualStudio" version="4.5.0" />
<PackageReference Include="stdole" version="7.0.3303" />
<PackageReference Include="StreamJsonRpc" version="2.11.35" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
Expand All @@ -183,10 +182,10 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Content Include="logo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="logo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
<Import Project="..\UnoSolutionTemplate.VSIX\UnoSolutionTemplate.VSIX.projitems" Label="Shared" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<Compile Include="XamarinUnoSolutionWizard.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="global.json" />
<None Include="key.snk" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ public void RunFinished()
File.WriteAllText(vsConfigPath, reader.ReadToEnd());
}

var globalJson = Path.Combine(_targetPath, "..\\global.json");

if (!File.Exists(globalJson))
{
using var reader = new StreamReader(GetType().Assembly.GetManifestResourceStream(FindManifestFileName($"global.json")));
File.WriteAllText(globalJson, reader.ReadToEnd());
}

var nugetConfigPath = Path.Combine(_targetPath, "..\\NuGet.config");

if (_enableNuGetConfig && !File.Exists(nugetConfigPath))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {

"version": "5.0.0",
"rollForward": "latestMinor"
}
}

0 comments on commit 464c34e

Please sign in to comment.