Skip to content

Commit

Permalink
Переменная для нацеливания на фреймворк
Browse files Browse the repository at this point in the history
- введена переменная TargetFrameworkId
- ей установлено значение net462
  • Loading branch information
EvilBeaver committed Jun 16, 2022
1 parent 4992e64 commit 7f7960d
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 40 deletions.
17 changes: 9 additions & 8 deletions Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<ArtifactsRoot>$(MSBuildProjectDirectory)/built</ArtifactsRoot>
<Solution>$(MSBuildProjectDirectory)/src/1Script.sln</Solution>
<Configuration>Release</Configuration>
<TargetFrameworkId>net462</TargetFrameworkId>
</PropertyGroup>

<ItemGroup>
Expand All @@ -31,11 +32,11 @@
<Delete Files="@(TestsResults)" />
<DeleteTree Directories="$(ArtifactsRoot)" Condition="Exists($(ArtifactsRoot))" />

<MSBuild Projects="$(Solution)" Targets="Clean" Properties="ReleaseNumber=$(ReleaseNumber);Configuration=$(Configuration);Platform=%(PlatformItem.MSBuildName)"/>
<MSBuild Projects="$(Solution)" Targets="restore;Clean" Properties="ReleaseNumber=$(ReleaseNumber);Configuration=$(Configuration);Platform=%(PlatformItem.MSBuildName);TargetFrameworkId=$(TargetFrameworkId)"/>

</Target>
<Target Name="Make">
<MSBuild Projects="$(Solution)" Targets="restore;Build" Properties="ReleaseNumber=$(ReleaseNumber);Configuration=$(Configuration);Platform=%(PlatformItem.MSBuildName);"/>
<MSBuild Projects="$(Solution)" Targets="restore;Build" Properties="ReleaseNumber=$(ReleaseNumber);Configuration=$(Configuration);Platform=%(PlatformItem.MSBuildName);TargetFrameworkId=$(TargetFrameworkId)"/>
</Target>

<Target Name="CreateDistributions" DependsOnTargets="CreateInstaller;CreateNuget;CreateZip">
Expand Down Expand Up @@ -75,21 +76,21 @@
<ItemGroup>
<BuiltProjects Include="oscript" />
<BuiltProjects Include="TestApp" />
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/$(Configuration)/net452/**">
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/$(Configuration)/$(TargetFrameworkId)/**">
<Dest>$(TempFolder)/bin</Dest>
</BinaryFiles>
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/x86/$(Configuration)/net452/**">
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/x86/$(Configuration)/$(TargetFrameworkId)/**">
<Dest>$(TempFolder)/bin32</Dest>
</BinaryFiles>
<AspFiles Include="$(MSBuildProjectDirectory)/src/ASPNETHandler/bin/$(Configuration)/net452/ASPNETHandler.dll"/>
<AspFiles Include="$(MSBuildProjectDirectory)/src/ASPNETHandler/bin/$(Configuration)/$(TargetFrameworkId)/ASPNETHandler.dll"/>
</ItemGroup>

<ItemGroup>
<BuiltProjects Include="ScriptEngine.NativeApi" />
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/$(Configuration)/net452/*.dll">
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/$(Configuration)/$(TargetFrameworkId)/*.dll">
<Dest>$(TempFolder)/bin</Dest>
</BinaryFiles>
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/x86/$(Configuration)/net452/*.dll">
<BinaryFiles Include="$(MSBuildProjectDirectory)/src/%(BuiltProjects.Identity)/bin/x86/$(Configuration)/$(TargetFrameworkId)/*.dll">
<Dest>$(TempFolder)/bin32</Dest>
</BinaryFiles>
</ItemGroup>
Expand All @@ -100,7 +101,7 @@
<Copy SourceFiles="$(MSBuildProjectDirectory)\install\opm.bat" DestinationFolder="%(BinaryFiles.Dest)"/>

<PropertyGroup>
<DebugSrc>$(MSBuildProjectDirectory)/src/VSCode.DebugAdapter/bin/$(Configuration)/net452</DebugSrc>
<DebugSrc>$(MSBuildProjectDirectory)/src/VSCode.DebugAdapter/bin/$(Configuration)/$(TargetFrameworkId)</DebugSrc>
</PropertyGroup>
<ItemGroup>
<DbgBinFiles Include="$(DebugSrc)/*.dll"/>
Expand Down
2 changes: 1 addition & 1 deletion src/ASPNETHandler/HTTPServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>ASPNETHandler</AssemblyName>
<AssemblyTitle>HTTP services for 1Script</AssemblyTitle>
<RootNamespace>ASPNETHandler</RootNamespace>
<TargetFramework>net452</TargetFramework>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="AspNetGlobalContextFunctions.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/Component/Component.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/OneScript.DebugProtocol/OneScript.DebugProtocol.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<Configurations>Debug;Release</Configurations>
<AssemblyTitle>1Script Debug Protocol common objects and DTO's</AssemblyTitle>
<Platforms>AnyCPU</Platforms>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkId);netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<Reference Include="System.ServiceModel" Condition="'$(TargetFramework)' == 'net452'" />
<Reference Include="System.ServiceModel" Condition="'$(TargetFramework)' == '$(TargetFrameworkId)'" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
Expand Down
2 changes: 1 addition & 1 deletion src/OneScript.DebugServices/OneScript.DebugServices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkId);netstandard2.0</TargetFrameworks>
<Title>Debug services for apps hosting 1script engine</Title>
<Copyright>Copyright (c) 2020 EvilBeaver</Copyright>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/OneScript.Language/OneScript.Language.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;netstandard2.1;</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkId);netstandard2.0;netstandard2.1;</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -17,7 +17,7 @@
<PackageTags>BSL 1C 1Script OneScript</PackageTags>
</PropertyGroup>

<Target Name="CopyToRunner" AfterTargets="Build" Condition="'$(TargetFramework)' == 'net452'">
<Target Name="CopyToRunner" AfterTargets="Build" Condition="'$(TargetFramework)' == '$(TargetFrameworkId)'">
<Message Text="Copying StandaloneRunner resources" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(MSBuildProjectDirectory)\..\StandaloneRunner\" />
</Target>
Expand Down
2 changes: 1 addition & 1 deletion src/OneScriptDocumenter/OneScriptDocumenter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
<OutputType>Exe</OutputType>
<Authors />
<Product>OneScript Libraries Documenter</Product>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />
<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkId);netstandard2.0;netstandard2.1</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand All @@ -26,11 +26,11 @@
<PackageCopyright>OneScript OpenSource Community 2015</PackageCopyright>
<PackageTags>BSL 1C 1Script OneScript</PackageTags>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Release|net452'">
<DocumentationFile>bin\Release\net452\ScriptEngine.HostedScript.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Release|$(TargetFrameworkId)'">
<DocumentationFile>bin\Release\$(TargetFrameworkId)\ScriptEngine.HostedScript.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
</PropertyGroup>
<Target Name="CopyToRunner" AfterTargets="Build" Condition="'$(TargetFramework)' == 'net452'">
<Target Name="CopyToRunner" AfterTargets="Build" Condition="'$(TargetFramework)' == '$(TargetFrameworkId)'">
<Message Text="Copying StandaloneRunner resources" />
<ItemGroup>
<CopyToStandalone Include="$(TargetPath)" />
Expand Down
9 changes: 5 additions & 4 deletions src/ScriptEngine.NativeApi/ScriptEngine.NativeApi.vcxproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand Down Expand Up @@ -73,22 +74,22 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(ProjectDir)bin\x86\$(Configuration)\net452\</OutDir>
<OutDir>$(ProjectDir)bin\x86\$(Configuration)\$(TargetFrameworkId)\</OutDir>
<TargetName>$(ProjectName)32</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(ProjectDir)bin\x86\$(Configuration)\net452\</OutDir>
<OutDir>$(ProjectDir)bin\x86\$(Configuration)\$(TargetFrameworkId)\</OutDir>
<TargetName>$(ProjectName)32</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(ProjectDir)\bin\$(Configuration)\net452\</OutDir>
<OutDir>$(ProjectDir)\bin\$(Configuration)\$(TargetFrameworkId)\</OutDir>
<TargetName>$(ProjectName)64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(ProjectDir)\bin\$(Configuration)\net452\</OutDir>
<OutDir>$(ProjectDir)\bin\$(Configuration)\$(TargetFrameworkId)\</OutDir>
<TargetName>$(ProjectName)64</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down
10 changes: 5 additions & 5 deletions src/ScriptEngine/ScriptEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworkId);netstandard2.0;netstandard2.1</TargetFrameworks>
<Configurations>Debug;Release</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
Expand All @@ -21,8 +21,8 @@
<PackageTags>BSL 1C 1Script OneScript</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net452|AnyCPU'">
<DocumentationFile>bin\Release\net452\ScriptEngine.xml</DocumentationFile>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|$(TargetFrameworkId)|AnyCPU'">
<DocumentationFile>bin\Release\$(TargetFrameworkId)\ScriptEngine.xml</DocumentationFile>
<NoWarn>1701;1702;1705;1591</NoWarn>
</PropertyGroup>

Expand All @@ -31,10 +31,10 @@
</ItemGroup>

<ItemGroup>
<Reference Include="CustomMarshalers" Condition="'$(TargetFramework)' == 'net452'" />
<Reference Include="CustomMarshalers" Condition="'$(TargetFramework)' == '$(TargetFrameworkId)'" />
</ItemGroup>

<Target Name="CopyToRunner" AfterTargets="Build" Condition="'$(TargetFramework)' == 'net452'">
<Target Name="CopyToRunner" AfterTargets="Build" Condition="'$(TargetFramework)' == '$(TargetFrameworkId)'">
<Message Text="Copying StandaloneRunner resources" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(MSBuildProjectDirectory)\..\StandaloneRunner\" />
</Target>
Expand Down
5 changes: 3 additions & 2 deletions src/StandaloneRunner/StandaloneRunner.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />
<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
<Configurations>Debug;Release</Configurations>
<ApplicationIcon />
Expand Down Expand Up @@ -37,7 +38,7 @@
<Delete Files="@(EmbeddedResource)" />
</Target>

<Target Name="CopyToOscript" AfterTargets="Build" Condition="'$(TargetFramework)' == 'net452'">
<Target Name="CopyToOscript" AfterTargets="Build">
<Message Text="Copying StandaloneRunner output" />
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(SolutionDir)oscript\" />
</Target>
Expand Down
2 changes: 1 addition & 1 deletion src/TestApp/TestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
<!--LanguageTargets>$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets</LanguageTargets-->
<ApplicationIcon>logo.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion src/VSCode.DebugAdapter/VSCode.DebugAdapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
<OutputType>Exe</OutputType>
<StartupObject>VSCode.DebugAdapter.Program</StartupObject>
<Configurations>Debug;Release</Configurations>
Expand Down
1 change: 1 addition & 0 deletions src/oscommon.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Configuration Condition="'$(Release)' == ''">Release</Configuration>
<Platform Condition="'$(Platform)' == ''">x86</Platform>
<LangVersion>7.3</LangVersion>
<TargetFrameworkId Condition="'$(TargetFrameworkId)' == ''">net462</TargetFrameworkId>
</PropertyGroup>

<PropertyGroup>
Expand Down
9 changes: 2 additions & 7 deletions src/oscript/oscript.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />

<PropertyGroup>
<TargetFrameworks>net452</TargetFrameworks>
<TargetFramework>$(TargetFrameworkId)</TargetFramework>
<ApplicationIcon />
<OutputType>Exe</OutputType>
<StartupObject>oscript.Program</StartupObject>
Expand All @@ -16,20 +16,15 @@
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<DebugType></DebugType>
<DocumentationFile>bin\x86\Debug\net452\oscript.xml</DocumentationFile>
<DocumentationFile>bin\x86\Debug\$(TargetFrameworkId)\oscript.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>false</DebugSymbols>
<DebugType></DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\x86\Debug</OutputPath>
<DefineConstants></DefineConstants>
<WarningLevel>4</WarningLevel>
<DocumentationFile></DocumentationFile>
<PlatformTarget>x86</PlatformTarget>
<IntermediateOutputPath>obj\x86\Debug</IntermediateOutputPath>
<NoWarn></NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
Expand Down

0 comments on commit 7f7960d

Please sign in to comment.