Skip to content

Commit

Permalink
Merge pull request #266 from dotnetcore/any
Browse files Browse the repository at this point in the history
发布前的准备工作
  • Loading branch information
NMSAzulX authored Jan 9, 2024
2 parents 7ab8fb5 + c88370f commit eb367f0
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 22 deletions.
24 changes: 12 additions & 12 deletions Natasha.sln
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Natasha.CSharp.Compiler.Dom
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Natasha.CSharp.Template.Core", "src\Natasha.CSharp\Component\Core\Natasha.CSharp.Template.Core\Natasha.CSharp.Template.Core.csproj", "{1A79A124-5C6D-456E-8402-33A1FA68C566}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Natasha.CSharp.Codecov", "src\Natasha.CSharp\Extension\Natasha.CSharp.Codecov\Natasha.CSharp.Codecov.csproj", "{5A914466-79DF-4F6E-8A8F-829CBDCDFFDE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Natasha.CSharp.Extension.Codecov", "src\Natasha.CSharp\Extension\Natasha.CSharp.Extension.Codecov\Natasha.CSharp.Extension.Codecov.csproj", "{4C7306AB-D54A-44C9-B653-C1E96B4BC419}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Natasha.CSharp.Extension.Ambiguity", "src\Natasha.CSharp\Extension\Natasha.CSharp.Extension.Ambiguity\Natasha.CSharp.Extension.Ambiguity.csproj", "{0A6025A4-97ED-4F67-9B49-82B417BCB81F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Natasha.CSharp.Extension.Ambiguity", "src\Natasha.CSharp\Extension\Natasha.CSharp.Extension.Ambiguity\Natasha.CSharp.Extension.Ambiguity.csproj", "{0D60DC94-C8A4-4CE7-9B3D-EB39FDA4EB48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -384,14 +384,14 @@ Global
{1A79A124-5C6D-456E-8402-33A1FA68C566}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A79A124-5C6D-456E-8402-33A1FA68C566}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A79A124-5C6D-456E-8402-33A1FA68C566}.Release|Any CPU.Build.0 = Release|Any CPU
{5A914466-79DF-4F6E-8A8F-829CBDCDFFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A914466-79DF-4F6E-8A8F-829CBDCDFFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A914466-79DF-4F6E-8A8F-829CBDCDFFDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A914466-79DF-4F6E-8A8F-829CBDCDFFDE}.Release|Any CPU.Build.0 = Release|Any CPU
{0A6025A4-97ED-4F67-9B49-82B417BCB81F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A6025A4-97ED-4F67-9B49-82B417BCB81F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A6025A4-97ED-4F67-9B49-82B417BCB81F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A6025A4-97ED-4F67-9B49-82B417BCB81F}.Release|Any CPU.Build.0 = Release|Any CPU
{4C7306AB-D54A-44C9-B653-C1E96B4BC419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C7306AB-D54A-44C9-B653-C1E96B4BC419}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C7306AB-D54A-44C9-B653-C1E96B4BC419}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C7306AB-D54A-44C9-B653-C1E96B4BC419}.Release|Any CPU.Build.0 = Release|Any CPU
{0D60DC94-C8A4-4CE7-9B3D-EB39FDA4EB48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D60DC94-C8A4-4CE7-9B3D-EB39FDA4EB48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D60DC94-C8A4-4CE7-9B3D-EB39FDA4EB48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D60DC94-C8A4-4CE7-9B3D-EB39FDA4EB48}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -465,8 +465,8 @@ Global
{02D796A3-A9FB-4E9C-972C-50B173DE213C} = {57D0570C-7B6A-4795-960E-D37E9FFDA066}
{CE5B5331-3F4F-412F-8169-8DA1D37170C6} = {57D0570C-7B6A-4795-960E-D37E9FFDA066}
{1A79A124-5C6D-456E-8402-33A1FA68C566} = {57D0570C-7B6A-4795-960E-D37E9FFDA066}
{5A914466-79DF-4F6E-8A8F-829CBDCDFFDE} = {0CB3AF52-50F3-4728-BAC6-389F2E995111}
{0A6025A4-97ED-4F67-9B49-82B417BCB81F} = {0CB3AF52-50F3-4728-BAC6-389F2E995111}
{4C7306AB-D54A-44C9-B653-C1E96B4BC419} = {0CB3AF52-50F3-4728-BAC6-389F2E995111}
{0D60DC94-C8A4-4CE7-9B3D-EB39FDA4EB48} = {0CB3AF52-50F3-4728-BAC6-389F2E995111}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3004E730-B231-40FA-B75C-58D7DDE17679}
Expand Down
4 changes: 2 additions & 2 deletions samples/ReferenceSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void Main(string[] args)
//Console.WriteLine(typeof(Math).Assembly.FullName);
NatashaManagement.RegistDomainCreator<NatashaDomainCreator>();
NatashaManagement.Preheating(true, true);
//TestMini();
TestMini();
//TestMini();
//var a = Math.Min(1, args.Length);
// NatashaManagement.Preheating<NatashaDomainCreator>(true, true);
Expand Down Expand Up @@ -143,9 +143,9 @@ public static void TestMini()

AssemblyCSharpBuilder builder = new();
builder
//.ConfigSyntaxOptions(opt=>opt.WithLanguageVersion(Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp11))
.UseRandomDomain()
.ConfigCompilerOption(item => item.WithLowerVersionsAssembly())
//.WithFileOutput()
.WithDebugCompile(item => item.WriteToAssembly())
.UseSimpleMode()
.UseSmartMode()
Expand Down
2 changes: 1 addition & 1 deletion samples/ReferenceSample/ReferenceSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Natasha.CSharp\Component\Core\Natasha.CSharp.Compiler.Domain\Natasha.CSharp.Compiler.Domain.csproj" />
<ProjectReference Include="..\..\src\Natasha.CSharp\Extension\Natasha.CSharp.Codecov\Natasha.CSharp.Codecov.csproj" />
<ProjectReference Include="..\..\src\Natasha.CSharp\Extension\Natasha.CSharp.Extension.Codecov\Natasha.CSharp.Extension.Codecov.csproj" />
</ItemGroup>

<!--<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
<NoWarn>1701;1702;0168;NETSDK1138;IDE0060;xUnit2000;CS0067;CS8321;CS0649;CS8604;CA1822;RS1014;CS1591;CA1050;</NoWarn>

</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(IsPackable)' != 'false'">
<None Include="$([MSBuild]::NormalizeDirectory('$(SolutionDir)', 'resources'))19404084.png" Link="19404084.png" Pack="true" PackagePath=""/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;</TargetFrameworks>
<Description>CS0104 问题处理扩展</Description>
<PackageId>DotNetCore.Natasha.Extension.Ambiguity</PackageId>
<PackageId>DotNetCore.Natasha.CSharp.Extension.Ambiguity</PackageId>
<PackageReleaseNotes>升级到最新版.</PackageReleaseNotes>
<PackageTags>Roslyn;IL;Script;Dynamic;Natasha;NMS;CS0104;</PackageTags>
<Version>8.0.0.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Description>Natasha 的方法使用率统计扩展.</Description>
<PackageId>DotNetCore.Natasha.CSharp.Codecov</PackageId>
<PackageId>DotNetCore.Natasha.CSharp.Extension.Codecov</PackageId>
<PackageReleaseNotes>升级到最新版.</PackageReleaseNotes>
<PackageTags>Natasha;Compiler;Extension;Codecov;</PackageTags>
<Version>8.0.0.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ public Assembly GetAssembly()
}
}
}
dllStream.Dispose();
pdbStream?.Dispose();
xmlStream?.Dispose();
if (!compileResult.Success)
else
{
CompileFailedEvent?.Invoke(_compilation, compileResult.Diagnostics);
throw NatashaExceptionAnalyzer.GetCompileException(_compilation, compileResult.Diagnostics);
}
dllStream.Dispose();
pdbStream?.Dispose();
xmlStream?.Dispose();

#if DEBUG
stopwatch.StopAndShowCategoreInfo("[ Emit ]", "编译时长", 2);
Expand Down

0 comments on commit eb367f0

Please sign in to comment.