Move targets, rzc and extension assembly in to the Sdk
This commit is contained in:
Родитель
0948660e8c
Коммит
0bd6d135c1
|
@ -1,8 +1,8 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">$(MicrosoftNETCoreApp20PackageVersion)</RuntimeFrameworkVersion>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">$(MicrosoftNETCoreApp21PackageVersion)</RuntimeFrameworkVersion>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">$(MicrosoftNETCoreApp22PackageVersion)</RuntimeFrameworkVersion>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreApp30PackageVersion)</RuntimeFrameworkVersion>
|
||||
<NETStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard2.0' ">$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
|
||||
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||
|
|
|
@ -18,54 +18,53 @@
|
|||
"DefaultCompositeRule"
|
||||
],
|
||||
"packages": {
|
||||
"Microsoft.AspNetCore.Razor.Design": {
|
||||
"Microsoft.NET.Sdk.Razor": {
|
||||
"exclusions": {
|
||||
"ASSEMBLY_DESCRIPTION": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"NEUTRAL_RESOURCES_LANGUAGE": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"ASSEMBLY_PRODUCT": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"SERVICING_ATTRIBUTE": {
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"VERSION_INFORMATIONALVERSION": {
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"WRONG_PUBLICKEYTOKEN": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"ASSEMBLY_INFORMATIONAL_VERSION_MISMATCH": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"ASSEMBLY_FILE_VERSION_MISMATCH": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"ASSEMBLY_VERSION_MISMATCH": {
|
||||
"tools/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.CSharp.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Microsoft.CodeAnalysis.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/Newtonsoft.Json.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions.",
|
||||
"tools/netcoreapp2.0/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll": "This assembly is not owned by us and does not follow our conventions."
|
||||
},
|
||||
"BUILD_ITEMS_FRAMEWORK": {
|
||||
"*": "Razor SDK does not contain any dependencies or binaries and consequently does not have a dependency group."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
15
Razor.sln
15
Razor.sln
|
@ -20,6 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
build\dependencies.props = build\dependencies.props
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Build.targets = Directory.Build.targets
|
||||
build\repo.props = build\repo.props
|
||||
build\repo.targets = build\repo.targets
|
||||
build\sources.props = build\sources.props
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -77,9 +79,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.Mac.
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test", "test\Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test\Microsoft.VisualStudio.Mac.LanguageServices.Razor.Test.csproj", "{B8A3E4CA-D54A-441F-A3BF-E00F060CA042}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Design", "src\Microsoft.AspNetCore.Razor.Design\Microsoft.AspNetCore.Razor.Design.csproj", "{5257B25D-330A-4DCF-ACED-B4709CFBF916}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Design.Test", "test\Microsoft.AspNetCore.Razor.Design.Test\Microsoft.AspNetCore.Razor.Design.Test.csproj", "{1D90F276-E1CA-4FDF-A173-EB889E7D3150}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.Sdk.Razor.Test", "test\Microsoft.NET.Sdk.Razor.Test\Microsoft.NET.Sdk.Razor.Test.csproj", "{1D90F276-E1CA-4FDF-A173-EB889E7D3150}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Test", "test\Microsoft.AspNetCore.Razor.Test\Microsoft.AspNetCore.Razor.Test.csproj", "{323553F0-14AB-4FBD-9CF0-1CC0BE8056F8}"
|
||||
EndProject
|
||||
|
@ -327,14 +327,6 @@ Global
|
|||
{B8A3E4CA-D54A-441F-A3BF-E00F060CA042}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B8A3E4CA-D54A-441F-A3BF-E00F060CA042}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B8A3E4CA-D54A-441F-A3BF-E00F060CA042}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.DebugNoVSIX|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.ReleaseNoVSIX|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916}.ReleaseNoVSIX|Any CPU.Build.0 = Release|Any CPU
|
||||
{1D90F276-E1CA-4FDF-A173-EB889E7D3150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1D90F276-E1CA-4FDF-A173-EB889E7D3150}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1D90F276-E1CA-4FDF-A173-EB889E7D3150}.DebugNoVSIX|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
@ -432,7 +424,6 @@ Global
|
|||
{FAF9986F-E086-4513-9D52-F7BF5FFCF31D} = {C0CC1E1F-1559-44DE-93A8-63259CEA2AAB}
|
||||
{95B18DEE-8B45-4CF0-B9F8-CCBAF3B5251A} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED}
|
||||
{B8A3E4CA-D54A-441F-A3BF-E00F060CA042} = {92463391-81BE-462B-AC3C-78C6C760741F}
|
||||
{5257B25D-330A-4DCF-ACED-B4709CFBF916} = {3C0D6505-79B3-49D0-B4C3-176F0F1836ED}
|
||||
{1D90F276-E1CA-4FDF-A173-EB889E7D3150} = {92463391-81BE-462B-AC3C-78C6C760741F}
|
||||
{323553F0-14AB-4FBD-9CF0-1CC0BE8056F8} = {92463391-81BE-462B-AC3C-78C6C760741F}
|
||||
{6205467F-E381-4C42-AEEC-763BD62B3D5E} = {C2C98051-0F39-47F2-80B6-E72B29159F2C}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<MicrosoftNETCoreApp20PackageVersion>2.0.9</MicrosoftNETCoreApp20PackageVersion>
|
||||
<MicrosoftNETCoreApp21PackageVersion>2.1.3</MicrosoftNETCoreApp21PackageVersion>
|
||||
<MicrosoftNETCoreApp22PackageVersion>2.2.0-rtm-27023-02</MicrosoftNETCoreApp22PackageVersion>
|
||||
<MicrosoftNETCoreApp30PackageVersion>3.0.0-preview1-26907-05</MicrosoftNETCoreApp30PackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
|
||||
<MicrosoftVisualStudioComponentModelHostPackageVersion>15.8.525</MicrosoftVisualStudioComponentModelHostPackageVersion>
|
||||
<MicrosoftVisualStudioEditorPackageVersion>16.0.142-g25b7188c54</MicrosoftVisualStudioEditorPackageVersion>
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp20PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp21PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp22PackageVersion)" />
|
||||
<DotNetCoreRuntime Include="$(MicrosoftNETCoreApp30PackageVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<PrepareDependsOn>$(PrepareDependsOn);GenerateMSBuildLocationFile</PrepareDependsOn>
|
||||
<RazorDesignTestProject>$(RepositoryRoot)test\Microsoft.AspNetCore.Razor.Design.Test\</RazorDesignTestProject>
|
||||
<MSBuildLocationFileTemplate>$(RazorDesignTestProject)BuildVariables.cs.template</MSBuildLocationFileTemplate>
|
||||
<MSBuildLocationFileOutput>$(RazorDesignTestProject)obj\BuildVariables.generated.cs</MSBuildLocationFileOutput>
|
||||
<RazorSdkTestProject>$(RepositoryRoot)test\Microsoft.NET.Sdk.Razor.Test\</RazorSdkTestProject>
|
||||
<MSBuildLocationFileTemplate>$(RazorSdkTestProject)BuildVariables.cs.template</MSBuildLocationFileTemplate>
|
||||
<MSBuildLocationFileOutput>$(RazorSdkTestProject)obj\BuildVariables.generated.cs</MSBuildLocationFileOutput>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GenerateMSBuildLocationFile"
|
||||
|
@ -24,8 +24,8 @@
|
|||
<PropertyGroup>
|
||||
<TemplateProperties>
|
||||
MSBuildLocation=$(VisualStudioMSBuildx86Path);
|
||||
MicrosoftNETCoreAppPackageVersion=$(MicrosoftNETCoreApp22PackageVersion);
|
||||
NETStandardLibraryPackageVersion=$(NETStandardLibrary20PackageVersion)
|
||||
MicrosoftNETCoreApp30PackageVersion=$(MicrosoftNETCoreApp30PackageVersion);
|
||||
NETStandardLibrary20PackageVersion=$(NETStandardLibrary20PackageVersion)
|
||||
</TemplateProperties>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<Project>
|
||||
<!--
|
||||
MSBuild support for Razor code generation that targets ASP.NET Core MVC 2.X
|
||||
|
||||
The properties and items here are designed to be read by CPS so they should be just simple evaluation-time values
|
||||
and should not require targets to initialize.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
Set the primary configuration supported by this pacakge as the default configuration for Razor.
|
||||
-->
|
||||
<RazorDefaultConfiguration Condition="'$(RazorDefaultConfiguration)'==''">MVC-2.1</RazorDefaultConfiguration>
|
||||
|
||||
<!--
|
||||
MVC uses a ProvideApplicationPartFactoryAttribute on the generated assembly to load compiled views from assembly. Set this to false, to prevent generating this attribute.
|
||||
-->
|
||||
<GenerateProvideApplicationPartFactoryAttribute>true</GenerateProvideApplicationPartFactoryAttribute>
|
||||
|
||||
<!-- Override for testing. This path is only correct inside a nuget package. -->
|
||||
<_MvcExtensionAssemblyPath Condition="'$(_MvcExtensionAssemblyPath)'==''">$(MSBuildThisFileDirectory)..\..\lib\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
While technically the assembly in this package can provide support for the MVC-2.0 configuration, don't declare
|
||||
it here. The IDE is hardcoded to inject 2.0 support when needed. The settings flowing through MSBuild should reflect
|
||||
the project's runtime.
|
||||
-->
|
||||
<RazorConfiguration Include="MVC-2.1">
|
||||
<Extensions>MVC-2.1;$(CustomRazorExtension)</Extensions>
|
||||
</RazorConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RazorExtension Include="MVC-2.1">
|
||||
<AssemblyName>Microsoft.AspNetCore.Mvc.Razor.Extensions</AssemblyName>
|
||||
<AssemblyFilePath>$(_MvcExtensionAssemblyPath)</AssemblyFilePath>
|
||||
</RazorExtension>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,36 +0,0 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
Determines if the Sdk is allowed to add additional attributes to the project assembly.
|
||||
For instance, MVC will generally want to add attributes to support view discovery and runtime compilation.
|
||||
-->
|
||||
<GenerateRazorAssemblyInfo Condition="'$(GenerateRazorAssemblyInfo)'==''">true</GenerateRazorAssemblyInfo>
|
||||
|
||||
<!--
|
||||
MVC will generally want to add support for runtime compilation, but only for applications.
|
||||
-->
|
||||
<GenerateRazorHostingAssemblyInfo Condition="'$(GenerateRazorHostingAssemblyInfo)'=='' AND '$(OutputType)'=='exe'">$(GenerateRazorAssemblyInfo)</GenerateRazorHostingAssemblyInfo>
|
||||
|
||||
<!--
|
||||
Use the suffix .Views when producing compiled view assemblies. This matches the requirements for Mvc's ViewsFeatureProvider.
|
||||
-->
|
||||
<RazorTargetNameSuffix Condition="'$(RazorTargetNameSuffix)'==''">.Views</RazorTargetNameSuffix>
|
||||
|
||||
<!--
|
||||
The type name of the ApplicationPartFactory applied to the generated Razor file.
|
||||
-->
|
||||
<ProvideApplicationPartFactoryAttributeTypeName Condition="'$(ProvideApplicationPartFactoryAttributeTypeName)' == ''">Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory, Microsoft.AspNetCore.Mvc.Razor</ProvideApplicationPartFactoryAttributeTypeName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(GenerateRazorAssemblyInfo)'=='true' AND '$(ResolvedRazorCompileToolset)'=='RazorSdk' AND ('$(RazorCompileOnBuild)' == 'true' OR '$(RazorCompileOnPublish)' == 'true')">
|
||||
<_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute">
|
||||
<_Parameter1>$(RazorTargetName)</_Parameter1>
|
||||
</_RazorAssemblyAttribute>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(GenerateProvideApplicationPartFactoryAttribute)' == 'true' AND '$(ProvideApplicationPartFactoryAttributeTypeName)'!=''">
|
||||
<RazorTargetAssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.ProvideApplicationPartFactoryAttribute">
|
||||
<_Parameter1>$(ProvideApplicationPartFactoryAttributeTypeName)</_Parameter1>
|
||||
</RazorTargetAssemblyAttribute>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,84 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor.</Description>
|
||||
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
|
||||
|
||||
<!-- This project doesn't have any code, so don't include it in the .nupkg -->
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
|
||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Building this package is somewhat complicated because we need to Publish some other projects
|
||||
that have different TFM's including one with multiple TFMs.
|
||||
|
||||
We then need to include the output of those projects in our output directory (where it will be used
|
||||
by tests) and in the nukpg.
|
||||
-->
|
||||
<!-- These are tools that need to be included in the package. -->
|
||||
|
||||
<PropertyGroup>
|
||||
<ToolProject>..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj</ToolProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(ToolProject)" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)' == 'netcoreapp2.0'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)'==''">
|
||||
<!-- Binaries produced in this project -->
|
||||
<SignedPackageFile Include="$(MSBuildProjectDirectory)\$(OutputPath)\tools/rzc.dll" Certificate="$(AssemblySigningCertName)" />
|
||||
|
||||
<!-- Third-party assemblies -->
|
||||
<SignedPackageFile Include="$(MSBuildProjectDirectory)\$(OutputPath)\tools/Newtonsoft.Json.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
|
||||
|
||||
<!-- Binaries that should be signed by corefx/roslyn -->
|
||||
<ExcludePackageFileFromSigning Include="$(MSBuildProjectDirectory)\$(OutputPath)\tools/Microsoft.CodeAnalysis.CSharp.dll" />
|
||||
<ExcludePackageFileFromSigning Include="$(MSBuildProjectDirectory)\$(OutputPath)\tools/Microsoft.CodeAnalysis.dll" />
|
||||
<ExcludePackageFileFromSigning Include="$(MSBuildProjectDirectory)\$(OutputPath)\tools/runtimes/unix/lib/netstandard1.3/System.Text.Encoding.CodePages.dll" />
|
||||
<ExcludePackageFileFromSigning Include="$(MSBuildProjectDirectory)\$(OutputPath)\tools/runtimes/win/lib/netstandard1.3/System.Text.Encoding.CodePages.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PopulateNuspec" BeforeTargets="GenerateNuspec">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Make sure we create a symbols.nupkg. -->
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
|
||||
<!-- RepositoryCommit is only available when "build" runs, but not during dotnet pack -->
|
||||
<RepositoryCommit Condition="'$(RepositoryCommit)' == ''">unknown</RepositoryCommit>
|
||||
|
||||
<NuspecProperties>
|
||||
id=$(PackageId);
|
||||
version=$(PackageVersion);
|
||||
authors=$(Authors);
|
||||
description=$(Description);
|
||||
tags=$(PackageTags.Replace(';', ' '));
|
||||
licenseUrl=$(PackageLicenseUrl);
|
||||
projectUrl=$(PackageProjectUrl);
|
||||
iconUrl=$(PackageIconUrl);
|
||||
repositoryUrl=$(RepositoryUrl);
|
||||
repositoryCommit=$(RepositoryCommit);
|
||||
copyright=$(Copyright);
|
||||
|
||||
<!-- Include the assembly and symbols from the tools project -->
|
||||
ToolFiles=$(OutputPath)tools\**\*;
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="LayoutDependencies" AfterTargets="Build" BeforeTargets="PopulateNuspec">
|
||||
<RemoveDir Directories="$(OutputPath)tools\" />
|
||||
<MSBuild Projects="$(ToolProject)" Properties="PublishDir=$(MSBuildProjectDirectory)\$(OutputPath)tools\;TargetFramework=netcoreapp2.0" Targets="Publish" />
|
||||
|
||||
<ItemGroup>
|
||||
<_RazorTool Include="$(OutputPath)tools\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Error Text="_RazorTool is empty. This is a bug" Condition="'@(_RazorTool)'==''" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>$id$</id>
|
||||
<version>$version$</version>
|
||||
<authors>$authors$</authors>
|
||||
<description>$description$</description>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<tags>$tags$</tags>
|
||||
<licenseUrl>$licenseUrl$</licenseUrl>
|
||||
<projectUrl>$projectUrl$</projectUrl>
|
||||
<iconUrl>$iconUrl$</iconUrl>
|
||||
<repository type="git" url="$repositoryUrl$" commit="$repositoryCommit$" />
|
||||
<copyright>$copyright$</copyright>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETStandard2.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="build\**\*.props" target="build\" />
|
||||
<file src="build\**\*.targets" target="build\" />
|
||||
<file src="buildMultiTargeting\**\*.props" target="buildMultiTargeting\" />
|
||||
<file src="buildMultiTargeting\**\*.targets" target="buildMultiTargeting\" />
|
||||
<file src="$TaskAssemblyNet46$" target="tasks\net46\" />
|
||||
<file src="$TaskSymbolNet46$" target="tasks\net46\" />
|
||||
<file src="$TaskAssemblyNetStandard$" target="tasks\netstandard2.0\" />
|
||||
<file src="$TaskSymbolNetStandard$" target="tasks\netstandard2.0\" />
|
||||
<file src="$ToolFiles$" target="tools\" exclude="**\*.xml" />
|
||||
</files>
|
||||
</package>
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"AssemblyIdentity": "Microsoft.AspNetCore.Razor.Design, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
|
||||
"Types": []
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
{
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<Project ToolsVersion="14.0" TreatAsLocalProperty="_RazorTaskFolder;_RazorTaskAssembly">
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
Used by the Web SDK if the Razor SDK can be used for compilation. This needs to live in a nuget package (not in the SDK)
|
||||
so that it only shows up in supported versions.
|
||||
-->
|
||||
<IsRazorCompilerReferenced>true</IsRazorCompilerReferenced>
|
||||
|
||||
<!--
|
||||
Location of the CodeGeneration targets. The SDK uses this to import the file ensuring deterministic import order.
|
||||
-->
|
||||
<RazorCodeGenerationTargetsPath>$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets</RazorCodeGenerationTargetsPath>
|
||||
|
||||
<!--
|
||||
Configures the language version of Razor. Supported and default values differ depending on the version of
|
||||
the packages in use.
|
||||
|
||||
Supported:
|
||||
2.0
|
||||
2.1
|
||||
Latest = 2.1
|
||||
|
||||
Default:
|
||||
2.1
|
||||
-->
|
||||
<RazorLangVersion Condition="'$(RazorLangVersion)'==''">2.1</RazorLangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override this to hijack the tasks and targets. Used by tests. -->
|
||||
<_RazorMSBuildRoot Condition="'$(_RazorMSBuildRoot)'==''">$(MSBuildThisFileDirectory)..\..\</_RazorMSBuildRoot>
|
||||
|
||||
<!-- Used to locate our tools -->
|
||||
<_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(_RazorMSBuildRoot)tools\rzc.dll</_RazorToolAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Defines the ability to understand the configuration for the Razor language service provided by
|
||||
the runtime/toolset packages. Introduced in 2.1
|
||||
-->
|
||||
<ProjectCapability Include="DotNetCoreRazorConfiguration"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,3 +0,0 @@
|
|||
<Project ToolsVersion="14.0">
|
||||
<Import Project="..\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
</Project>
|
|
@ -7,7 +7,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<AssemblyName>rzc</AssemblyName>
|
||||
|
||||
<!-- This is not a package, it is part of Microsoft.AspNetCore.Razor.Design. -->
|
||||
<!-- This is not a package, it is part of Razor SDK. -->
|
||||
<IsPackable>false</IsPackable>
|
||||
<EnableApiCheck>false</EnableApiCheck>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Tools.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
|
||||
[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Razor.Design.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
|
||||
[assembly: InternalsVisibleTo("Microsoft.NET.Sdk.Razor.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
|
||||
|
||||
|
|
|
@ -1,30 +1,23 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor.</Description>
|
||||
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.2;netstandard2.0;net46</TargetFrameworks>
|
||||
|
||||
<TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName>
|
||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
<Serviceable>true</Serviceable>
|
||||
<SdkOutputPath>bin\$(Configuration)\sdk-output\</SdkOutputPath>
|
||||
|
||||
<!-- Do not disable ApiCheck. We need to be aware of when we make changes to the Tasks sicne they need to be backwards compatible. -->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Sdk\*" Pack="true" PackagePath="Sdk\" />
|
||||
<None Include="build\**\*" Pack="true" PackagePath="build" />
|
||||
<None Include="buildMultiTargeting\**\*" Pack="true" PackagePath="buildMultiTargeting" />
|
||||
<None Include="bin\$(Configuration)\net46\$(TargetName).*" Pack="true" PackagePath="tasks\net46" />
|
||||
<None Include="bin\$(Configuration)\netstandard2.0\$(TargetName).*" Pack="true" PackagePath="tasks\netstandard2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkPackageVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCorePackageVersion)" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCorePackageVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
|
||||
|
||||
<ItemGroup>
|
||||
<SignedPackageFile Include="$(TargetPath)" PackagePath="tasks/$(TargetFramework)/$(TargetFileName)" Certificate="$(AssemblySigningCertName)" />
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Mvc.Razor.Extensions\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netstandard2.0'" />
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netcoreapp2.2'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -41,4 +34,64 @@
|
|||
<Link>Shared\Client.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="LayoutDependencies" BeforeTargets="Build" Condition="'$(IsInnerBuild)' != 'true'">
|
||||
<!-- Layout tasks, compiler, and extensions in the sdk-output folder. The entire folder structure gets packaged as-is into the SDK -->
|
||||
<MSBuild
|
||||
Projects="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj"
|
||||
Properties="PublishDir=$(MSBuildProjectDirectory)\$(SdkOutputPath)tools\netcoreapp2.0;TargetFramework=netcoreapp2.0"
|
||||
Targets="Publish" />
|
||||
|
||||
<ItemGroup>
|
||||
<MvcRazorExtenionOutput Include="..\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(MvcRazorExtenionOutput)" DestinationFolder="$(SdkOutputPath)extensions\mvc-2-1\" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectOutput Include="..\Microsoft.NET.Sdk.Razor\bin\$(Configuration)\net46*\Microsoft.NET.Sdk.Razor.Tasks.*" />
|
||||
<ProjectOutput Include="..\Microsoft.NET.Sdk.Razor\bin\$(Configuration)\netstandard2.0*\Microsoft.NET.Sdk.Razor.Tasks.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(ProjectOutput)" DestinationFiles="$(SdkOutputPath)tasks\%(RecursiveDir)%(FileName)%(Extension)" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<SignedPackageFile Include="$(SdkOutputPath)tasks\net46\$(TargetName).dll" Certificate="$(AssemblySigningCertName)" />
|
||||
<SignedPackageFile Include="$(SdkOutputPath)tasks\netstandard2.0\$(TargetName).dll" Certificate="$(AssemblySigningCertName)" />
|
||||
<SignedPackageFile Include="$(SdkOutputPath)extensions\**\*.dll" Certificate="$(AssemblySigningCertName)" />
|
||||
|
||||
<SignedPackageFile Include="$(SdkOutputPath)tools\netcoreapp2.0\rzc.dll" Certificate="$(AssemblySigningCertName)" />
|
||||
<SignedPackageFile Include="$(SdkOutputPath)tools\netcoreapp2.0\Newtonsoft.Json.dll" Certificate="$(AssemblySigning3rdPartyCertName)" />
|
||||
|
||||
<!-- Binaries that should be signed by corefx/roslyn -->
|
||||
<ExcludePackageFileFromSigning Include="$(SdkOutputPath)tools\netcoreapp2.0\Microsoft.CodeAnalysis.CSharp.dll" />
|
||||
<ExcludePackageFileFromSigning Include="$(SdkOutputPath)tools\netcoreapp2.0\Microsoft.CodeAnalysis.dll" />
|
||||
<ExcludePackageFileFromSigning Include="$(SdkOutputPath)tools\netcoreapp2.0\runtimes\unix\lib\netstandard1.3\System.Text.Encoding.CodePages.dll" />
|
||||
<ExcludePackageFileFromSigning Include="$(SdkOutputPath)tools\netcoreapp2.0\runtimes\win\lib\netstandard1.3\System.Text.Encoding.CodePages.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PopulateNuspec" BeforeTargets="GenerateNuspec" DependsOnTargets="LayoutDependencies">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Make sure we create a symbols.nupkg -->
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<NuspecProperties>
|
||||
id=$(MSBuildProjectName);
|
||||
version=$(PackageVersion);
|
||||
authors=$(Authors);
|
||||
licenseUrl=$(PackageLicenseUrl);
|
||||
projectUrl=$(PackageProjectUrl);
|
||||
iconUrl=$(PackageIconUrl);
|
||||
copyright=$(Copyright);
|
||||
description=$(Description);
|
||||
tags=$([MSBuild]::Escape($(PackageTags)));
|
||||
serviceable=$(Serviceable);
|
||||
repositoryUrl=$(RepositoryUrl);
|
||||
repositoryCommit=$(RepositoryCommit);
|
||||
targetframework=$(TargetFramework);
|
||||
outputpath=$(OutputPath)\sdk-output;
|
||||
</NuspecProperties>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>$id$</id>
|
||||
<version>$version$</version>
|
||||
<authors>$authors$</authors>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<licenseUrl>$licenseUrl$</licenseUrl>
|
||||
<projectUrl>$projectUrl$</projectUrl>
|
||||
<iconUrl>$iconUrl$</iconUrl>
|
||||
<description>$description$</description>
|
||||
<copyright>$copyright$</copyright>
|
||||
<tags>$tags$</tags>
|
||||
<serviceable>$serviceable$</serviceable>
|
||||
<repository type="git" url="$repositoryUrl$" commit="$repositoryCommit$" />
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="Sdk\*" target="Sdk" />
|
||||
<file src="build\**" target="build" />
|
||||
<file src="buildMultiTargeting\**" target="buildMultiTargeting" />
|
||||
|
||||
<file src="$outputpath$\**" target="\" />
|
||||
</files>
|
||||
</package>
|
|
@ -1,3 +1,15 @@
|
|||
<!--
|
||||
***********************************************************************************************
|
||||
Microsoft.NET.Sdk.Razor.CodeGeneration
|
||||
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
||||
created a backup copy. Incorrect changes to this file will make it
|
||||
impossible to load or build your projects from the command-line or the IDE.
|
||||
|
||||
Copyright (c) .NET Foundation. All rights reserved.
|
||||
***********************************************************************************************
|
||||
-->
|
||||
|
||||
<Project ToolsVersion="14.0">
|
||||
<!--
|
||||
Targets used for Razor SDK code generation. Support for the RazorCoreGenerate target.
|
||||
|
@ -14,18 +26,20 @@
|
|||
AssemblyFile="$(RazorSdkBuildTasksAssembly)"
|
||||
Condition="'$(RazorSdkBuildTasksAssembly)' != ''" />
|
||||
|
||||
<!--
|
||||
<!--
|
||||
Consider these properties to be private to this targets file. The main Razor SDK should define all of the properties
|
||||
that we use to pass data back and forth.
|
||||
that we use to pass data back and forth.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!-- Used for tag helper discovery -->
|
||||
<_RazorTagHelperInputCache>$(IntermediateOutputPath)$(TargetName).TagHelpers.input.cache</_RazorTagHelperInputCache>
|
||||
<_RazorTagHelperOutputCache>$(IntermediateOutputPath)$(TargetName).TagHelpers.output.cache</_RazorTagHelperOutputCache>
|
||||
|
||||
|
||||
<!-- Used to hash file inputs for RazorGenerate -->
|
||||
<_RazorGenerateInputsHash></_RazorGenerateInputsHash>
|
||||
<_RazorGenerateInputsHashFile>$(IntermediateOutputPath)$(MSBuildProjectName).RazorCoreGenerate.cache</_RazorGenerateInputsHashFile>
|
||||
|
||||
<_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(RazorSdkDirectoryRoot)tools\netcoreapp2.0\rzc.dll</_RazorToolAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
|
@ -33,8 +47,8 @@
|
|||
|
||||
This is part of the chain of targets that are called once we've actually committed to generating code.
|
||||
-->
|
||||
<Target
|
||||
Name="_HashRazorGenerateInputs"
|
||||
<Target
|
||||
Name="_HashRazorGenerateInputs"
|
||||
Condition="'@(RazorGenerateWithTargetPath)' != ''">
|
||||
|
||||
<Hash ItemsToHash="@(RazorGenerateWithTargetPath)">
|
||||
|
@ -63,7 +77,7 @@
|
|||
Outputs="$(_RazorTagHelperInputCache)"
|
||||
Condition="'@(RazorGenerateWithTargetPath)' != ''">
|
||||
|
||||
<!--
|
||||
<!--
|
||||
We're manipulating our output directly here because we want to separate the actual up-to-date check
|
||||
of RazorCoreGenerate from the output of this target. Many times the set of tag helpers doesn't change
|
||||
so we don't need to regenerate the code.
|
||||
|
@ -158,8 +172,8 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="_EnsureRazorTasksAssemblyDefined">
|
||||
<Error
|
||||
Text="Assembly location for Razor SDK Tasks was not specified. The most likely cause is an older incompatible version of Microsoft.NET.Sdk.Razor, or Microsoft.NET.Sdk.Web used by this project. Please target a newer version of the .NET Core SDK."
|
||||
<Error
|
||||
Text="Assembly location for Razor SDK Tasks was not specified. The most likely cause is an older incompatible version of Microsoft.NET.Sdk.Razor, or Microsoft.NET.Sdk.Web used by this project. Please target a newer version of the .NET Core SDK."
|
||||
Condition="'$(RazorSdkBuildTasksAssembly)' == ''" />
|
||||
</Target>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<!--
|
||||
***********************************************************************************************
|
||||
Microsoft.Net.Sdk.Razor.Versions.targets
|
||||
|
||||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
|
||||
created a backup copy. Incorrect changes to this file will make it
|
||||
impossible to load or build your projects from the command-line or the IDE.
|
||||
|
||||
Copyright (c) .NET Foundation. All rights reserved.
|
||||
***********************************************************************************************
|
||||
-->
|
||||
<Project ToolsVersion="14.0">
|
||||
<!--
|
||||
Initialize properties and items inferred using the project version. This file is not imported in projects referencing
|
||||
MVC \ Razor 2.2 or earlier since values specified here are provided via targets and props imported from NuGet packages
|
||||
such as Microsoft.AspNetCore.Razor.Design.
|
||||
|
||||
The properties and items here are designed to be read by CPS so they should be just simple evaluation-time values
|
||||
and should not require targets to initialize.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
MVC uses a ProvideApplicationPartFactoryAttribute on the generated assembly to load compiled views from assembly. Set this to false, to prevent generating this attribute.
|
||||
-->
|
||||
<GenerateProvideApplicationPartFactoryAttribute Condition="'$(GenerateProvideApplicationPartFactoryAttribute)'==''">true</GenerateProvideApplicationPartFactoryAttribute>
|
||||
|
||||
<!--
|
||||
Determines if the Sdk is allowed to add additional attributes to the project assembly.
|
||||
For instance, MVC will generally want to add attributes to support view discovery and runtime compilation.
|
||||
-->
|
||||
<GenerateRazorAssemblyInfo Condition="'$(GenerateRazorAssemblyInfo)'==''">true</GenerateRazorAssemblyInfo>
|
||||
|
||||
<!--
|
||||
MVC will generally want to add support for runtime compilation, but only for applications.
|
||||
-->
|
||||
<GenerateRazorHostingAssemblyInfo Condition="'$(GenerateRazorHostingAssemblyInfo)'=='' AND '$(OutputType)'=='exe'">$(GenerateRazorAssemblyInfo)</GenerateRazorHostingAssemblyInfo>
|
||||
|
||||
<!--
|
||||
The type name of the ApplicationPartFactory applied to the generated Razor file.
|
||||
-->
|
||||
<ProvideApplicationPartFactoryAttributeTypeName Condition="'$(ProvideApplicationPartFactoryAttributeTypeName)' == ''">Microsoft.AspNetCore.Mvc.ApplicationParts.CompiledRazorAssemblyApplicationPartFactory, Microsoft.AspNetCore.Mvc.Razor</ProvideApplicationPartFactoryAttributeTypeName>
|
||||
|
||||
<!-- Continue setting this property to maintain compat with legacy Razor.Design -->
|
||||
<IsRazorCompilerReferenced Condition="'$(IsRazorCompilerReferenced)'==''">true</IsRazorCompilerReferenced>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<_TargetingNETCoreApp30OrLater Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' > '2.9'">true</_TargetingNETCoreApp30OrLater>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RazorLangVersion)'==''">
|
||||
<RazorLangVersion Condition="'$(_TargetingNETCoreApp30OrLater)' == 'true'">2.1</RazorLangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Set the primary configuration supported by this SDK as the default configuration for Razor.
|
||||
-->
|
||||
<PropertyGroup Condition="'$(RazorDefaultConfiguration)'==''">
|
||||
<RazorDefaultConfiguration Condition="'$(_TargetingNETCoreApp30OrLater)' == 'true'">MVC-2.1</RazorDefaultConfiguration>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
While technically the assembly in this package can provide support for the MVC-2.0 configuration, don't declare
|
||||
it here. The IDE is hardcoded to inject 2.0 support when needed. The settings flowing through MSBuild should reflect
|
||||
the project's runtime.
|
||||
-->
|
||||
<RazorConfiguration Include="MVC-2.1">
|
||||
<Extensions>MVC-2.1;$(CustomRazorExtension)</Extensions>
|
||||
</RazorConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RazorExtension Include="MVC-2.1">
|
||||
<AssemblyName>Microsoft.AspNetCore.Mvc.Razor.Extensions</AssemblyName>
|
||||
<AssemblyFilePath>$(RazorSdkDirectoryRoot)extensions\mvc-2-1\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</AssemblyFilePath>
|
||||
</RazorExtension>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(GenerateRazorAssemblyInfo)'=='true' AND '$(ResolvedRazorCompileToolset)'=='RazorSdk' AND ('$(RazorCompileOnBuild)' == 'true' OR '$(RazorCompileOnPublish)' == 'true')">
|
||||
<_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute">
|
||||
<_Parameter1>$(RazorTargetName)</_Parameter1>
|
||||
</_RazorAssemblyAttribute>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(GenerateProvideApplicationPartFactoryAttribute)' == 'true' AND '$(ProvideApplicationPartFactoryAttributeTypeName)'!=''">
|
||||
<RazorTargetAssemblyAttribute Include="Microsoft.AspNetCore.Mvc.ApplicationParts.ProvideApplicationPartFactoryAttribute">
|
||||
<_Parameter1>$(ProvideApplicationPartFactoryAttributeTypeName)</_Parameter1>
|
||||
</RazorTargetAssemblyAttribute>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -21,6 +21,12 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
we use the lack of the capability to detect downlevel scenarios.
|
||||
-->
|
||||
<ProjectCapability Include="DotNetCoreRazor"/>
|
||||
|
||||
<!--
|
||||
Defines the ability to understand the configuration for the Razor language service provided by
|
||||
the runtime/toolset packages. Introduced in 2.1
|
||||
-->
|
||||
<ProjectCapability Include="DotNetCoreRazorConfiguration"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -22,10 +22,15 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<Import Project="$(CustomBeforeRazorSdkTargets)" Condition="'$(CustomBeforeRazorSdkTargets)' != '' and Exists('$(CustomBeforeRazorSdkTargets)')"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\tasks\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. -->
|
||||
<RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netstandard2.0</_RazorSdkTasksTFM>
|
||||
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
|
||||
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
|
||||
|
||||
<_TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</_TargetFrameworkVersionWithoutV>
|
||||
<_EnableAllInclusiveRazorSdk Condition="'$(_EnableInclusiveRazorSdk)' == '' AND '$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(_TargetFrameworkVersionWithoutV)' > '2.9'">true</_EnableAllInclusiveRazorSdk>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
|
@ -123,6 +128,11 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<!-- Output directory used for generated files -->
|
||||
<RazorGenerateIntermediateOutputPath Condition="'$(RazorGenerateIntermediateOutputPath)'==''">$(IntermediateOutputPath)Razor\</RazorGenerateIntermediateOutputPath>
|
||||
|
||||
<!--
|
||||
Use the suffix .Views when producing compiled view assemblies. This matches the requirements for Mvc's ViewsFeatureProvider.
|
||||
-->
|
||||
<RazorTargetNameSuffix Condition="'$(_EnableInclusiveRazorSdk)' == '' AND '$(RazorTargetNameSuffix)'==''">.Views</RazorTargetNameSuffix>
|
||||
|
||||
<!-- Suffix appended to $(TargetName) to produce $(RazorTargetName), the name of the assembly produced by Razor -->
|
||||
<RazorTargetNameSuffix Condition="'$(RazorTargetNameSuffix)' == ''">.Razor</RazorTargetNameSuffix>
|
||||
|
||||
|
@ -187,8 +197,8 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<ResolvedRazorCompileToolset Condition="'$(MvcRazorCompileOnPublish)' == '' AND '$(RazorCompileToolset)' == 'PrecompilationTool'">$(RazorCompileToolset)</ResolvedRazorCompileToolset>
|
||||
<ResolvedRazorCompileToolset Condition="'$(MvcRazorCompileOnPublish)' == '' AND '$(RazorCompileToolset)' == 'RazorSdk'">$(RazorCompileToolset)</ResolvedRazorCompileToolset>
|
||||
|
||||
<!-- If RazorSdk is not referenced, fall-back to Precompilation tool -->
|
||||
<ResolvedRazorCompileToolset Condition="'$(ResolvedRazorCompileToolset)' == 'RazorSdk' And '$(IsRazorCompilerReferenced)' != 'true'">PrecompilationTool</ResolvedRazorCompileToolset>
|
||||
<!-- If RazorSdk is not referenced, fall-back to Precompilation tool when referenced by a 2.2 or earlier targeting project. -->
|
||||
<ResolvedRazorCompileToolset Condition="'$(ResolvedRazorCompileToolset)' == 'RazorSdk' And '$(IsRazorCompilerReferenced)' != 'true' AND '$(_EnableAllInclusiveRazorSdk)' != 'true'">PrecompilationTool</ResolvedRazorCompileToolset>
|
||||
|
||||
<!-- Previous versions of the precompilation tool still depends on the msbuild property 'MvcRazorCompileOnPublish'. Hence, setting it to the old default value -->
|
||||
<MvcRazorCompileOnPublish Condition="'$(MvcRazorCompileOnPublish)' == ''">true</MvcRazorCompileOnPublish>
|
||||
|
@ -219,13 +229,22 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<!--
|
||||
These are the targets that generate code using Razor, separated from the main file for ease of maintenance.
|
||||
Most targets related to Razor code generation are defined there.
|
||||
-->
|
||||
|
||||
<!-- Determine what compiler and versions of the language to target. For 2.x targeting projects, these are carried by packages referenced by the project. Use this -->
|
||||
|
||||
<!-- Use the 2.x compiler if we're building an application that references Microsoft.AspNetCore.Razor.Design. -->
|
||||
<Import Project="$(RazorCodeGenerationTargetsPath)"
|
||||
Condition="'$(RazorCodeGenerationTargetsPath)' != '' AND Exists('$(RazorCodeGenerationTargetsPath)')" />
|
||||
Condition="'$(IsRazorCompilerReferenced)' == 'true' AND '$(RazorCodeGenerationTargetsPath)' != '' AND Exists('$(RazorCodeGenerationTargetsPath)')" />
|
||||
|
||||
<!-- When targeting 3.x and later projects, we have to infer configuration by inspecting the project. -->
|
||||
<Import Project="Microsoft.NET.Sdk.Razor.Configuration.targets" Condition="'$(_EnableAllInclusiveRazorSdk)' == 'true'" />
|
||||
|
||||
<!-- For projects targeting 3.x and later, use the compiler that ships in the Sdk -->
|
||||
<Import Project="Microsoft.NET.Sdk.Razor.CodeGeneration.targets" Condition="'$(_EnableAllInclusiveRazorSdk)' == 'true'" />
|
||||
|
||||
<Import Project="Microsoft.NET.Sdk.Razor.GenerateAssemblyInfo.targets" />
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
internal static partial class BuildVariables
|
||||
{
|
||||
private static string _msBuildPath = string.Empty;
|
||||
private static string _microsoftNETCoreAppPackageVersion = string.Empty;
|
||||
private static string _netStandardLibraryPackageVersion = string.Empty;
|
||||
private static string _microsoftNETCoreApp30PackageVersion = string.Empty;
|
||||
private static string _netStandardLibrary20PackageVersion = string.Empty;
|
||||
|
||||
static partial void InitializeVariables();
|
||||
|
||||
|
@ -20,21 +20,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
}
|
||||
}
|
||||
|
||||
public static string MicrosoftNETCoreAppPackageVersion
|
||||
public static string MicrosoftNETCoreApp30PackageVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
InitializeVariables();
|
||||
return _microsoftNETCoreAppPackageVersion;
|
||||
return _microsoftNETCoreApp30PackageVersion;
|
||||
}
|
||||
}
|
||||
|
||||
public static string NETStandardLibraryPackageVersion
|
||||
public static string NETStandardLibrary20PackageVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
InitializeVariables();
|
||||
return _netStandardLibraryPackageVersion;
|
||||
return _netStandardLibrary20PackageVersion;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,8 +8,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
static partial void InitializeVariables()
|
||||
{
|
||||
_msBuildPath = @"${MSBuildLocation}";
|
||||
_microsoftNETCoreAppPackageVersion = "${MicrosoftNETCoreAppPackageVersion}";
|
||||
_netStandardLibraryPackageVersion = "${NETStandardLibraryPackageVersion}";
|
||||
_microsoftNETCoreApp30PackageVersion = "${MicrosoftNETCoreApp30PackageVersion}";
|
||||
_netStandardLibrary20PackageVersion = "${NETStandardLibrary20PackageVersion}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -186,7 +186,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
filePath = Path.Combine(result.Project.DirectoryPath, filePath);
|
||||
FileExists(result, filePath);
|
||||
|
||||
|
||||
var lines = File.ReadAllLines(filePath);
|
||||
for (var i = 0; i < lines.Length; i++)
|
||||
{
|
||||
|
@ -651,7 +651,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
{
|
||||
get
|
||||
{
|
||||
return
|
||||
return
|
||||
$"nuspec: '{FilePath}' did not contain the expected content." + Environment.NewLine +
|
||||
Environment.NewLine +
|
||||
$"expected: {Expected}" + Environment.NewLine +
|
|
@ -614,6 +614,22 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.Equal(firstAssemblyBytes, secondAssemblyBytes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[InitializeTestProject("SimpleMvc21")]
|
||||
public async Task Building_NETCoreApp21TargetingProject()
|
||||
{
|
||||
TargetFramework = "netcoreapp2.1";
|
||||
|
||||
// Build
|
||||
var result = await DotnetMSBuild("Build");
|
||||
|
||||
Assert.BuildPassed(result);
|
||||
Assert.FileExists(result, OutputPath, "SimpleMvc21.dll");
|
||||
Assert.FileExists(result, OutputPath, "SimpleMvc21.pdb");
|
||||
Assert.FileExists(result, OutputPath, "SimpleMvc21.Views.dll");
|
||||
Assert.FileExists(result, OutputPath, "SimpleMvc21.Views.pdb");
|
||||
}
|
||||
|
||||
private static DependencyContext ReadDependencyContext(string depsFilePath)
|
||||
{
|
||||
var reader = new DependencyContextJsonReader();
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -39,7 +37,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
private async Task Build_SimpleMvc_CanBuildSuccessfully(MSBuildProcessKind msBuildProcessKind)
|
||||
{
|
||||
var result = await DotnetMSBuild(
|
||||
"Build",
|
||||
"Build",
|
||||
"/p:_RazorForceBuildServer=true",
|
||||
msBuildProcessKind: msBuildProcessKind);
|
||||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.pdb");
|
||||
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.Views.dll");
|
||||
Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.Views.pdb");
|
||||
|
||||
|
||||
// This target should be part of the design time build.
|
||||
Assert.Contains("RazorGetAssemblyAttributes", result.Output);
|
||||
|
||||
|
@ -56,11 +56,11 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Path.Combine("Views", "_ViewImports.cshtml"),
|
||||
Path.Combine("Views", "_ViewStart.cshtml"),
|
||||
};
|
||||
|
||||
|
||||
foreach (var filePath in filePaths)
|
||||
{
|
||||
Assert.BuildOutputContainsLine(
|
||||
result,
|
||||
result,
|
||||
$@"RazorGenerateWithTargetPath: {filePath} {filePath} {Path.Combine(RazorIntermediateOutputPath, Path.ChangeExtension(filePath, ".g.cshtml.cs"))}");
|
||||
}
|
||||
}
|
|
@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
public bool Equals(FileThumbPrint other)
|
||||
{
|
||||
return
|
||||
return
|
||||
string.Equals(Path, other.Path, StringComparison.Ordinal) &&
|
||||
LastWriteTimeUtc == other.LastWriteTimeUtc &&
|
||||
string.Equals(Hash, other.Hash, StringComparison.Ordinal);
|
|
@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
}
|
||||
|
||||
MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language);
|
||||
MSBuildIntegrationTestBase.TargetFramework = _originalProjectName.StartsWith("ClassLibrary") ? "netstandard2.0" : "netcoreapp2.2";
|
||||
MSBuildIntegrationTestBase.TargetFramework = _originalProjectName.StartsWith("ClassLibrary") ? "netstandard2.0" : "netcoreapp3.0";
|
||||
}
|
||||
|
||||
public override void After(MethodInfo methodUnderTest)
|
|
@ -71,8 +71,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
// Let the test app know it is running as part of a test.
|
||||
"/p:RunningAsTest=true",
|
||||
|
||||
$"/p:MicrosoftNETCoreAppVersion={BuildVariables.MicrosoftNETCoreAppPackageVersion}",
|
||||
$"/p:NETStandardLibraryPackageVersion={BuildVariables.NETStandardLibraryPackageVersion}",
|
||||
$"/p:MicrosoftNETCoreApp30PackageVersion={BuildVariables.MicrosoftNETCoreApp30PackageVersion}",
|
||||
$"/p:NETStandardLibrary20PackageVersion={BuildVariables.NETStandardLibrary20PackageVersion}",
|
||||
};
|
||||
|
||||
if (!suppressRestore)
|
|
@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
public string FileName { get; }
|
||||
|
||||
public int ExitCode { get; }
|
||||
|
||||
|
||||
public string Output { get; }
|
||||
}
|
||||
}
|
|
@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
Assert.FileExists(result, OutputPath, "ClassLibrary.dll");
|
||||
Assert.FileExists(result, OutputPath, "ClassLibrary.Views.dll");
|
||||
|
||||
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
// Travis on OSX produces different full paths in C# and MSBuild
|
|
@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
CopyGlobalJson(solutionRoot, destinationPath);
|
||||
|
||||
return new ProjectDirectory(
|
||||
destinationPath,
|
||||
destinationPath,
|
||||
directoryPath,
|
||||
newProjectFilePath);
|
||||
}
|
|
@ -142,7 +142,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
Assert.BuildPassed(result);
|
||||
|
||||
// Everything we do should noop - including building the app.
|
||||
// Everything we do should noop - including building the app.
|
||||
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll");
|
||||
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb");
|
||||
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");
|
||||
|
@ -160,7 +160,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
Assert.BuildPassed(result);
|
||||
|
||||
// Everything we do should noop - including building the app.
|
||||
// Everything we do should noop - including building the app.
|
||||
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll");
|
||||
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb");
|
||||
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");
|
||||
|
@ -177,7 +177,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
Assert.BuildPassed(result);
|
||||
|
||||
// Everything we do should noop - including building the app.
|
||||
// Everything we do should noop - including building the app.
|
||||
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll");
|
||||
Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb");
|
||||
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");
|
||||
|
@ -411,7 +411,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
var result = await DotnetMSBuild("Publish", "/p:NoBuild=true");
|
||||
|
||||
Assert.BuildFailed(result);
|
||||
Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp2.2/SimpleMvc.dll because it couldn't be found.
|
||||
Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp3.0/SimpleMvc.dll because it couldn't be found.
|
||||
|
||||
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.dll");
|
||||
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");
|
|
@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
|
||||
Assert.BuildPassed(result);
|
||||
|
||||
// Everything we do should noop - including building the app.
|
||||
// Everything we do should noop - including building the app.
|
||||
Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.dll");
|
||||
Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.pdb");
|
||||
Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll");
|
||||
|
@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
[InitializeTestProject("SimpleMvc")]
|
||||
[InitializeTestProject("SimpleMvc")]
|
||||
public async Task RazorCompile_EmbedRazorGenerateSources_EmbedsCshtmlFiles()
|
||||
{
|
||||
var result = await DotnetMSBuild("RazorCompile", "/p:EmbedRazorGenerateSources=true");
|
|
@ -1,12 +1,10 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Testing.xunit;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|
@ -1,13 +1,13 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!--
|
||||
<!--
|
||||
There's not much value in multi-targeting here, this doesn't run much .NET code, it tests MSBuild.
|
||||
|
||||
|
||||
This is also a partial workaround for https://github.com/Microsoft/msbuild/issues/2661 - this project
|
||||
has netcoreapp2.0 dependencies that need to be built first.
|
||||
-->
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
has netcoreapp dependencies that need to be built first.
|
||||
-->
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<DefineConstants Condition="'$(PreserveWorkingDirectory)'=='true'">$(DefineConstants);PRESERVE_WORKING_DIRECTORY</DefineConstants>
|
||||
<!-- Copy references locally so that we can use them in the test. -->
|
||||
|
@ -33,14 +33,10 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="$(MicrosoftAspNetCoreHtmlAbstractionsPackageVersion)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- We don't need anything in this assembly, we just want to make sure it's built -->
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Razor.Design\Microsoft.AspNetCore.Razor.Design.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.NET.Sdk.Razor\Microsoft.NET.Sdk.Razor.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
|
@ -54,5 +50,5 @@
|
|||
<Target Name="EnsureBuildVariablesGeneratedFile">
|
||||
<Error Text="BuildVariables.generated.cs was not found. Run .\build /t:Prepare from the root of the repository to generate it." Condition="!Exists('$(BuildVariablesGeneratedFile)')" />
|
||||
</Target>
|
||||
|
||||
|
||||
</Project>
|
|
@ -1,19 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -40,6 +32,4 @@
|
|||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Runtime.dll"/>
|
||||
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
</Project>
|
||||
|
|
|
@ -1,18 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
|
||||
|
@ -20,6 +11,10 @@
|
|||
<Product>Razor Test</Product>
|
||||
<Company>Microsoft</Company>
|
||||
<Description>ClassLibrary Description</Description>
|
||||
|
||||
<_EnableAllInclusiveRazorSdk>true</_EnableAllInclusiveRazorSdk>
|
||||
<RazorLangVersion>2.1</RazorLangVersion>
|
||||
<RazorDefaultConfiguration>MVC-2.1</RazorDefaultConfiguration>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -43,6 +38,4 @@
|
|||
|
||||
<!-- Test Placeholder -->
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
|
||||
<_EnableAllInclusiveRazorSdk>true</_EnableAllInclusiveRazorSdk>
|
||||
<RazorLangVersion>2.1</RazorLangVersion>
|
||||
<RazorDefaultConfiguration>MVC-2.1</RazorDefaultConfiguration>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -42,6 +37,4 @@
|
|||
|
||||
<!-- Test Placeholder -->
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||
|
||||
<NETStandardImplicitPackageVersion>$(NETStandardLibraryPackageVersion)</NETStandardImplicitPackageVersion>
|
||||
<NETStandardImplicitPackageVersion>$(NETStandardLibrary20PackageVersion)</NETStandardImplicitPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Don't use the server when building in place. This locks up rzc.dll -->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Import Project="RazorTest.Introspection.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp2.2' ">$(MicrosoftNETCoreAppVersion)</RuntimeFrameworkVersion>
|
||||
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreApp30PackageVersion)</RuntimeFrameworkVersion>
|
||||
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -37,7 +28,5 @@
|
|||
</ItemGroup>
|
||||
|
||||
<!-- Test Placeholder -->
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -26,7 +17,6 @@
|
|||
<!-- In test scenarios $(BinariesRoot) is defined in a generated Directory.Build.props file -->
|
||||
<ProjectReference Include="..\..\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.csproj"/>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.Razor.Runtime\Microsoft.AspNetCore.Razor.Runtime.csproj"/>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.Razor.Design\Microsoft.AspNetCore.Razor.Design.csproj" ReferenceOutputAssembly="false" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(BinariesRoot)'!=''">
|
||||
|
@ -38,6 +28,4 @@
|
|||
|
||||
<!-- Test Placeholder -->
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
|
||||
namespace SimpleMvc.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
namespace SimpleMvc
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// Just make sure we have a reference to the MVC 2.1
|
||||
var t = typeof(Microsoft.AspNetCore.Mvc.IActionResult);
|
||||
System.Console.WriteLine(t.FullName);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<!--
|
||||
This project references a shipped version of MVC and should not reference local builds of
|
||||
the CodeGeneration targets, rzc, or any of the test shims.
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
<!-- We don't want to run build server when not running as tests. -->
|
||||
<UseRazorBuildServer>false</UseRazorBuildServer>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App">
|
||||
<!-- Avoid exporting types from real MVC that will conflict with the test shim -->
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2">
|
||||
<!-- Avoid exporting types from real MVC that will conflict with the test shim -->
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,7 @@
|
|||
@{
|
||||
ViewData["Title"] = "About";
|
||||
}
|
||||
<h2>@ViewData["Title"]</h2>
|
||||
<h3>@ViewData["Message"]</h3>
|
||||
|
||||
<p>Use this area to provide additional information.</p>
|
|
@ -0,0 +1,108 @@
|
|||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
}
|
||||
|
||||
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="1"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="2"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="3"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner" role="listbox">
|
||||
<div class="item active">
|
||||
<img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" />
|
||||
<div class="carousel-caption" role="option">
|
||||
<p>
|
||||
Learn how to build ASP.NET apps that can run anywhere.
|
||||
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409">
|
||||
Learn More
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/images/banner2.svg" alt="Visual Studio" class="img-responsive" />
|
||||
<div class="carousel-caption" role="option">
|
||||
<p>
|
||||
There are powerful new features in Visual Studio for building modern web apps.
|
||||
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409">
|
||||
Learn More
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" />
|
||||
<div class="carousel-caption" role="option">
|
||||
<p>
|
||||
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
|
||||
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409">
|
||||
Learn More
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/images/banner4.svg" alt="Microsoft Azure" class="img-responsive" />
|
||||
<div class="carousel-caption" role="option">
|
||||
<p>
|
||||
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
|
||||
<a class="btn btn-default" href="https://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409">
|
||||
Learn More
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<h2>Application uses</h2>
|
||||
<ul>
|
||||
<li>Sample pages using ASP.NET Core MVC</li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
|
||||
<li>Theming using <a href="https://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h2>How to</h2>
|
||||
<ul>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h2>Overview</h2>
|
||||
<ul>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h2>Run & Deploy</h2>
|
||||
<ul>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
|
||||
<li><a href="https://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>@ViewData["Title"] - SimpleMvc</title>
|
||||
|
||||
<environment include="Development">
|
||||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
|
||||
<link rel="stylesheet" href="~/css/site.css" />
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
|
||||
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
|
||||
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
|
||||
</environment>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">SimpleMvc</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
|
||||
<li><a asp-area="" asp-controller="Home" asp-action="About">About</a></li>
|
||||
<li><a asp-area="" asp-controller="Home" asp-action="Contact">Contact</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
<footer>
|
||||
<p>© 2017 - SimpleMvc</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<environment include="Development">
|
||||
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
|
||||
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||
asp-fallback-test="window.jQuery"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
|
||||
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
|
||||
</script>
|
||||
<script src="~/js/site.min.js" asp-append-version="true"></script>
|
||||
</environment>
|
||||
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<environment include="Development">
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-Fnqn3nxp3506LP/7Y3j/25BlWeA3PXTyT1l78LjECcPaKCV12TsZP7yyMxOe/G/k">
|
||||
</script>
|
||||
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha384-JrXK+k53HACyavUKOsL+NkmSesD2P+73eDMrbTtTk0h4RmOF8hF8apPlkp26JlyH">
|
||||
</script>
|
||||
</environment>
|
|
@ -0,0 +1,3 @@
|
|||
@using SimpleMvc
|
||||
@using SimpleMvc.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@ -0,0 +1,3 @@
|
|||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
|
@ -1,20 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -43,6 +34,4 @@
|
|||
|
||||
<!-- Test Placeholder -->
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<_RazorMSBuildRoot>$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\bin\$(Configuration)\</_RazorMSBuildRoot>
|
||||
<RazorSdkBuildTasksDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\</RazorSdkBuildTasksDirectoryRoot>
|
||||
<RazorSdkDirectoryRoot>$(RazorSdkProjectDirectory)bin\$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Razor.Design\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Override for the MVC extension -->
|
||||
<_MvcExtensionAssemblyPath>$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\bin\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll</_MvcExtensionAssemblyPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
@ -37,7 +28,5 @@
|
|||
</ItemGroup>
|
||||
|
||||
<!-- Test Placeholder -->
|
||||
|
||||
<Import Project="$(SolutionRoot)src\Microsoft.AspNetCore.Mvc.Razor.Extensions\build\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.targets" />
|
||||
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче