Skip to content

Commit

Permalink
Move MSBuildTask and TSGenerator to Nuget to simplify first compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jbu committed Nov 29, 2018
1 parent 79aea92 commit bedc53e
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 90 deletions.
3 changes: 2 additions & 1 deletion Signum.Analyzer/Signum.Analyzer/Signum.Analyzer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
<RepositoryUrl>https://github.com/signumsoftware/framework</RepositoryUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Description>Signum.Analyzer</Description>
<Copyright>LGPL</Copyright>
<Copyright></Copyright>
<PackageTags>Signum.Analyzer, analyzers</PackageTags>
<NoPackageAnalysis>true</NoPackageAnalysis>
<PackageLicenseUrl>https://opensource.org/licenses/MIT</PackageLicenseUrl>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 3 additions & 8 deletions Signum.Engine/Signum.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

<ItemGroup>
<PackageReference Include="Signum.Analyzer" Version="1.0.0" />
<PackageReference Include="Signum.MSBuildTask" Version="1.0.0" />
<PackageReference Include="Signum.MSBuildTask" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -19,12 +21,5 @@
<ProjectReference Include="..\Signum.Entities\Signum.Entities.csproj" />
<ProjectReference Include="..\Signum.Utilities\Signum.Utilities.csproj" />
</ItemGroup>

<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;..\Signum.MSBuildTask\Binaries\netcoreapp2.1\Signum.MSBuildTask.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>


</Project>
9 changes: 1 addition & 8 deletions Signum.Entities/Signum.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

<ItemGroup>
<PackageReference Include="Signum.Analyzer" Version="1.0.0" />
<PackageReference Include="Signum.MSBuildTask" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Signum.MSBuildTask\Signum.MSBuildTask.csproj" />
<ProjectReference Include="..\Signum.Utilities\Signum.Utilities.csproj" />
</ItemGroup>

Expand All @@ -21,11 +21,4 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;..\Signum.MSBuildTask\Binaries\netcoreapp2.1\Signum.MSBuildTask.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
</Project>
4 changes: 2 additions & 2 deletions Signum.MSBuildTask/Signum.MSBuildTask.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<LangVersion>latest</LangVersion>
<OutputPath>Binaries\</OutputPath>
<Platforms>x64</Platforms>
<NuSpecFile>Signum.MSBuildTask.nuspec</NuSpecFile>
</PropertyGroup>

<ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="0.10.1" />
</ItemGroup>

Expand Down
22 changes: 22 additions & 0 deletions Signum.MSBuildTask/Signum.MSBuildTask.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>Signum.MSBuildTask</id>
<version>1.0.0</version>
<title>IL rewriter for Signum Framework applications</title>
<authors>Olmo del Corral</authors>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
<projectUrl>http://www.signumframework.com</projectUrl>
<iconUrl>http://www.signumsoftware.com/Images/Framework/LogoFramework.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>IL Weaver for Signum Framework applications (auto-properties in entities, [AutoInit] and [ExpressionField])</description>
<copyright>Copyright 2018</copyright>
<tags>signum msbuild linq react</tags>
</metadata>
<files>
<file src="bin\**\*.*" target="lib" exclude="bin\**\*.*" />
<file src=".\bin\$configuration$\netcoreapp2.1\*.dll" target="build" />
<file src=".\bin\$configuration$\netcoreapp2.1\*.json" target="build" />
<file src="Signum.MSBuildTask.targets" target="build" />
</files>
</package>
22 changes: 0 additions & 22 deletions Signum.MSBuildTask/Signum.MSBuildTask.sln

This file was deleted.

8 changes: 8 additions & 0 deletions Signum.MSBuildTask/Signum.MSBuildTask.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;$(MSBuildThisFileDirectory)\Signum.MSBuildTask.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
</Project>
20 changes: 2 additions & 18 deletions Signum.React/Signum.React.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<ItemGroup>
<PackageReference Include="Signum.Analyzer" Version="1.0.0" />
<ProjectReference Include="..\Signum.TSGenerator\Signum.TSGenerator.csproj" />
<PackageReference Include="Signum.TSGenerator" Version="1.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -41,21 +41,5 @@
<TypeScriptCompile Include="**\*.tsx" />
<TypeScriptCompile Include="**\*.ts" />
</ItemGroup>

<Target Name="GenerateSignumTS">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumContent.txt" Lines="@(Content);@(None)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;..\Signum.TSGenerator\Binaries\netcoreapp2.1\Signum.TSGenerator.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot; &quot;$(BaseIntermediateOutputPath)SignumContent.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>

<PropertyGroup>
<CompileTypeScriptDependsOn>
GenerateSignumTS;
$(CompileTypeScriptDependsOn);
</CompileTypeScriptDependsOn>
<ApplicationIcon />
</PropertyGroup>


</Project>
1 change: 0 additions & 1 deletion Signum.TSGenerator/Signum.TSGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<OutputType>Exe</OutputType>
<StartupObject>Signum.TSGenerator.Program</StartupObject>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<OutputPath>Binaries\</OutputPath>
<LangVersion>latest</LangVersion>
<Platforms>x64</Platforms>
</PropertyGroup>
Expand Down
22 changes: 22 additions & 0 deletions Signum.TSGenerator/Signum.TSGenerator.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>Typescript generator for Signum Framework applications</title>
<authors>Olmo del Corral</authors>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
<projectUrl>http://www.signumframework.com</projectUrl>
<iconUrl>http://www.signumsoftware.com/Images/Framework/LogoFramework.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>For every SomeEntitiesNamespace.t4s files in your React project generates a SomeEntitiesNamespace.ts with defined Entities, Queries, Messages, Operations, etc..</description>
<copyright>Copyright 2018</copyright>
<tags>signum msbuild linq react</tags>
</metadata>
<files>
<file src="bin\**\*.*" target="lib" exclude="bin\**\*.*" />
<file src=".\bin\$configuration$\netcoreapp2.1\*.dll" target="build" />
<file src=".\bin\$configuration$\netcoreapp2.1\*.json" target="build" />
<file src="Signum.TSGenerator.targets" target="build" />
</files>
</package>
23 changes: 0 additions & 23 deletions Signum.TSGenerator/Signum.TSGenerator.sln

This file was deleted.

17 changes: 17 additions & 0 deletions Signum.TSGenerator/Signum.TSGenerator.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GenerateSignumTS">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumContent.txt" Lines="@(Content);@(None)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;$(MSBuildThisFileDirectory)\Signum.TSGenerator.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot; &quot;$(BaseIntermediateOutputPath)SignumContent.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>

<PropertyGroup>
<CompileTypeScriptDependsOn>
GenerateSignumTS;
$(CompileTypeScriptDependsOn);
</CompileTypeScriptDependsOn>
<ApplicationIcon />
</PropertyGroup>
</Project>
8 changes: 1 addition & 7 deletions Signum.Test/Signum.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,9 @@

<ItemGroup>
<PackageReference Include="Signum.Analyzer" Version="1.0.0" />
<PackageReference Include="Signum.MSBuildTask" Version="1.0.0" />
</ItemGroup>

<Target Name="SignumAfterCompile" AfterTargets="AfterCompile" Outputs="$(TargetPath)">
<WriteLinesToFile File="$(BaseIntermediateOutputPath)SignumReferences.txt" Lines="@(ReferencePath)" Overwrite="true" Encoding="Unicode" />
<Exec command="dotnet &quot;..\Signum.MSBuildTask\Binaries\netcoreapp2.1\Signum.MSBuildTask.dll&quot; &quot;@(IntermediateAssembly)&quot; &quot;$(BaseIntermediateOutputPath)SignumReferences.txt&quot;" ConsoleToMSBuild="false">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>

<ItemGroup>
<None Update="appsettings.json">
<Generator></Generator>
Expand Down

3 comments on commit bedc53e

@olmobrutall
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signum MSBuildTask and TSGenerator as Nuget

After this change (and a few fixes after) MSBuildTask and TSGenerator are now distributed as Nuget. They are still part of this repository but should not be used directly.

image

1.- Clean Initial Build: The main benefit is having a clean build without dotnet .... returned -1 errors (as in .Net Core till now), but also not having dll blocked as suspicious when Creating a new application (as in was with .Net Framework version).

2.- Simplification: Now the Tooling folder can be removed from the solution, also the csproj files are simpler, since most of the Signum Magic is inside of the Nuget 🎉

3.- Official Icons: The new nuget, and Signum.Analyzer, have been updated to have proper icons. Signum 4 Live!

As usual, you can take a look at Southwind to keep up to date. Just check this commit: signumsoftware/southwind@c451f46

Enjoy!

@MehdyKarimpour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect

@olmobrutall
Copy link
Collaborator

@olmobrutall olmobrutall commented on bedc53e Dec 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW: If you're interested in the extension that i use, it's called BuildVision

Please sign in to comment.