Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuget #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.suo
*.user
*.sln.docstates
*.csproj.user

# Build results
[Dd]ebug/
Expand Down
2 changes: 1 addition & 1 deletion WebSite/WootzJs.Site.Api/WootzJs.Site.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,4 @@
</Target>
<Target Name="AfterBuild">
</Target> -->
</Project>
</Project>
2 changes: 1 addition & 1 deletion WebSite/WootzJs.Site.Web/WootzJs.Site.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,4 @@
</Target>
<Target Name="AfterBuild">
</Target> -->
</Project>
</Project>
12 changes: 6 additions & 6 deletions WootzJs.Compiler.Tests/Test.htm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<body>

</body>
<script type="text/javascript" src="../build/mscorlib.js"></script>
<script type="text/javascript" src="../build/System.js"></script>
<script type="text/javascript" src="../build/System.ComponentModel.DataAnnotations.js"></script>
<script type="text/javascript" src="../build/WootzJs.Web.js"></script>
<script type="text/javascript" src="../build/WootzJs.Testing.js"></script>
<script type="text/javascript" src="../build/WootzJs.Compiler.Tests.js"></script>
<script type="text/javascript" src="./mscorlib.js"></script>
<script type="text/javascript" src="./System.js"></script>
<script type="text/javascript" src="./System.ComponentModel.DataAnnotations.js"></script>
<script type="text/javascript" src="./WootzJs.Web.js"></script>
<script type="text/javascript" src="./WootzJs.Testing.js"></script>
<script type="text/javascript" src="./WootzJs.Compiler.Tests.js"></script>
<!--
<script type="text/javascript" src="bin/WootzJs.Compiler.Tests.js"></script>
-->
Expand Down
17 changes: 12 additions & 5 deletions WootzJs.Compiler.Tests/WootzJs.Compiler.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -28,7 +28,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -144,11 +144,18 @@
<Name>WootzJs.Testing</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Reset.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Test.htm">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(ProjectDir)..\build\WootzJs.targets" />
<PropertyGroup>
<PostBuildEvent>$(ProjectDir)..\WootzJs.Compiler\bin\debug\WootzJs.Compiler.exe $(ProjectPath) $(OutDir) mscorlib=$(ProjectDir)..\WootzJs.Runtime\WootzJs.Runtime.csproj
copy $(TargetDir)WootzJs.Compiler.Tests.js $(ProjectDir)..\build</PostBuildEvent>
<PostBuildEvent>$(ProjectDir)..\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir) mscorlib=$(ProjectDir)..\WootzJs.Runtime\WootzJs.Runtime.csproj</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<AdditionalExplicitAssemblyReferences />
Expand All @@ -160,4 +167,4 @@ copy $(TargetDir)WootzJs.Compiler.Tests.js $(ProjectDir)..\build</PostBuildEvent
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
18 changes: 18 additions & 0 deletions WootzJs.Compiler.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<package >
<metadata>
<id>WootzJs.Compiler</id>
<version>1.0.2</version>
<authors>Kirk Woll</authors>
<owners>Kirk Woll</owners>
<licenseUrl>https://github.com/kswoll/WootzJs/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/kswoll/WootzJs</projectUrl>
<summary>Compiles C# to JavaScript</summary>
<description>Compiles C# to JavaScript</description>
</metadata>
<files>
<file src="build/**" target="tools" />
<file src="WootzJs.Runtime/**/*.cs" target="tools" />
<file src="WootzJs.Runtime/**/*.csproj" target="tools" />
</files>
</package>
10 changes: 8 additions & 2 deletions WootzJs.Compiler/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,14 @@ public async Task<Tuple<string, Project>> CompileProject(string projectFile)
{
var mscorlibProject = await workspace.OpenProjectAsync(mscorlib);
result = await workspace.OpenProjectAsync(projectFile);
result = result.AddProjectReference(new ProjectReference(mscorlibProject.Id));
result = result.RemoveMetadataReference(result.MetadataReferences.Single(x => x.Display.Contains("mscorlib.dll")));
if (!result.ProjectReferences.Any(projectReference => projectReference.ProjectId == mscorlibProject.Id)) {
result = result.AddProjectReference(new ProjectReference(mscorlibProject.Id));
}

MetadataReference metadataReference = result.MetadataReferences.SingleOrDefault(x => x.Display.Contains("mscorlib.dll"));
if (metadataReference != null) {
result = result.RemoveMetadataReference(metadataReference);
}
}
else
{
Expand Down
10 changes: 3 additions & 7 deletions WootzJs.Compiler/WootzJs.Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -233,15 +233,11 @@
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(ProjectDir)SpecialNames.cs $(ProjectDir)..\WootzJs.Runtime\Runtime\WootzJs
copy $(ProjectDir)TypeFlags.cs $(ProjectDir)..\WootzJs.Runtime\Runtime\WootzJs</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -55,8 +55,7 @@
<Import Project="$(ProjectDir)..\build\WootzJs.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>$(ProjectDir)..\WootzJs.Compiler\bin\debug\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)
copy $(TargetDir)System.ComponentModel.DataAnnotations.js $(ProjectDir)..\build</PostBuildEvent>
<PostBuildEvent>$(ProjectDir)..\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -65,4 +64,4 @@ copy $(TargetDir)System.ComponentModel.DataAnnotations.js $(ProjectDir)..\build<
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
9 changes: 4 additions & 5 deletions WootzJs.Injection/WootzJs.Injection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -58,8 +58,7 @@
<Import Project="$(ProjectDir)..\build\WootzJs.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>$(ProjectDir)..\WootzJs.Compiler\bin\debug\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)
copy $(TargetDir)WootzJs.Injection.js $(ProjectDir)..\build</PostBuildEvent>
<PostBuildEvent>$(ProjectDir)..\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -68,4 +67,4 @@ copy $(TargetDir)WootzJs.Injection.js $(ProjectDir)..\build</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
9 changes: 4 additions & 5 deletions WootzJs.JQuery/WootzJs.JQuery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -50,8 +50,7 @@
<Import Project="$(ProjectDir)..\build\WootzJs.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>$(SolutionDir)WootzJs.Compiler\bin\debug\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)
copy $(TargetDir)WootzJs.JQuery.js $(SolutionDir)build</PostBuildEvent>
<PostBuildEvent>$(ProjectDir)..\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -60,4 +59,4 @@ copy $(TargetDir)WootzJs.JQuery.js $(SolutionDir)build</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
11 changes: 4 additions & 7 deletions WootzJs.Models.Js/WootzJs.Models.Js.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -46,10 +46,7 @@
<Import Project="$(ProjectDir)..\build\WootzJs.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>$(ProjectDir)..\WootzJs.Compiler\bin\debug\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)
copy $(ProjectDir)..\build\mscorlib.js $(TargetDir)
copy $(TargetDir)WootzJs.Models.js $(ProjectDir)..\build
copy $(TargetDir)WootzJs.Models.dll $(ProjectDir)..\build</PostBuildEvent>
<PostBuildEvent>$(ProjectDir)..\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -58,4 +55,4 @@ copy $(TargetDir)WootzJs.Models.dll $(ProjectDir)..\build</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
6 changes: 3 additions & 3 deletions WootzJs.Models.Net45/WootzJs.Models.Net45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -52,4 +52,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
9 changes: 4 additions & 5 deletions WootzJs.Mvc/WootzJs.Mvc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\build\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand Down Expand Up @@ -182,8 +182,7 @@
<Import Project="$(ProjectDir)..\build\WootzJs.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>$(ProjectDir)..\WootzJs.Compiler\bin\debug\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)
copy $(TargetDir)WootzJs.Mvc.js $(ProjectDir)..\build</PostBuildEvent>
<PostBuildEvent>$(ProjectDir)..\build\WootzJs.Compiler.exe $(ProjectPath) $(OutDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand All @@ -192,4 +191,4 @@ copy $(TargetDir)WootzJs.Mvc.js $(ProjectDir)..\build</PostBuildEvent>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
Loading