Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/veracode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,10 @@ jobs:

- name: Build
run: |
$configuration = "Release"
$veracodesolution = "VeracodeSolution"
$veracodesolutionFileName = "VeracodeSolution.sln"
$veracodetargetframework = "net4"
dotnet new sln --name $veracodesolution --output dotnet --force
dotnet msbuild dotnet\DotNetStandardClasses.sln /t:DumpProjects -p:DumpSolutionName=$veracodesolutionFileName -p:DumpSolutionTargetFramework=$veracodetargetframework /m:1
dotnet publish dotnet\$veracodesolutionFileName --configuration $Env:BuildConfiguration -o .out -p:Publishing=true -p:SignAssembly=false
dotnet msbuild dotnet\DotNetStandardClasses.sln /t:DumpProjects -p:DumpSolutionName=$veracodesolution /m:1
dotnet msbuild dotnet\Directory.Build.targets /t:PublishForAnalyzer -p:DumpSolutionName=$veracodesolution

- name: Create package for Veracode scan
shell: powershell
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,4 @@ build
/dotnet/src/dotnetcore/Reor/net6.0/Reor.deps.json
.out
/dotnet/Veracode.sln
/dotnet/VeracodeSolution.sln
54 changes: 8 additions & 46 deletions dotnet/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</PropertyGroup>

<PropertyGroup>
<DumpSolutionName>TempSolution.sln</DumpSolutionName>
<DumpSolutionTargetFramework>net4</DumpSolutionTargetFramework>
<DumpSolutionName>TempSolution</DumpSolutionName>
<DumpSolutionTargetFrameworkDefault>net6</DumpSolutionTargetFrameworkDefault>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -29,55 +29,17 @@
</PackageReference>
</ItemGroup>

<UsingTask
TaskName="ReplaceFileText"
TaskFactory="RoslynCodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<InputFilename ParameterType="System.String" Required="true" />
<OutputFilename ParameterType="System.String" Required="true" />
<MatchExpression ParameterType="System.String" Required="true" />
<ReplacementText ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System"/>
<Using Namespace="System.IO"/>
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs">
<![CDATA[
File.WriteAllText(
OutputFilename,
Regex.Replace(File.ReadAllText(InputFilename), MatchExpression, ReplacementText)
);
]]>
</Code>
</Task>
</UsingTask>


<Target Name="PostBuild" AfterTargets="Build" Condition="'$(GxGenerateDepsFile)'=='true' AND ('$(TargetFramework)'=='net6.0')">
<MakeDir Directories="$(TargetFramework)"/>
<Exec Command="copy $(OutDir)$(ProjectName).deps.json $(TargetFramework)\$(ProjectName).deps.json" />
<ReplaceFileText
InputFilename="$(TargetFramework)\$(ProjectName).deps.json"
OutputFilename="$(TargetFramework)\$(ProjectName).deps.json"
MatchExpression="GeneXus\.Classes\.Core"
ReplacementText="GxClasses" />
<ReplaceFileText
InputFilename="$(TargetFramework)\$(ProjectName).deps.json"
OutputFilename="$(TargetFramework)\$(ProjectName).deps.json"
MatchExpression="GeneXus\.Classes\.Web\.Core"
ReplacementText="GxClasses.Web"/>
</Target>

<Target Name="CopyAssemblies" Condition="'$(ProjectName)'!='' AND Exists('$(ProjectDir)$(OutDir)$(TargetFileName)')">
<Message Importance="high" Text="Copying $(ProjectDir)$(OutDir)$(TargetFileName) to $(DeployDirectory)"></Message>
<Copy SourceFiles="$(ProjectDir)$(OutDir)$(TargetFileName)" DestinationFolder="$(DeployDirectory)" />
</Target>

<Target Name="DumpProjects" Condition="($(TargetFramework.StartsWith($(DumpSolutionTargetFramework))) OR $(TargetFrameworks.Contains($(DumpSolutionTargetFramework))) ) AND !$(MSBuildProjectFullPath.Contains('\test\'))">
<Message Importance="high" Text="Adding $(MSBuildProjectFullPath) to $(MSBuildThisFileDirectory)$(DumpSolutionName)"></Message>
<Exec Command="dotnet sln $(MSBuildThisFileDirectory)$(DumpSolutionName) add $(MSBuildProjectFullPath)"></Exec>
<Target Name="DumpProjects" Condition="($(TargetFramework.StartsWith($(DumpSolutionTargetFrameworkDefault))) OR $(TargetFrameworks.Contains($(DumpSolutionTargetFrameworkDefault))) ) AND !$(MSBuildProjectFullPath.Contains('\test\')) AND ('$(IsPublishable)'=='true' OR '$(IsPublishable)'=='')">
<Exec Command="dotnet sln $(MSBuildThisFileDirectory)$(DumpSolutionName).sln add $(MSBuildProjectFullPath)"></Exec>
</Target>

<Target Name="PublishForAnalyzer">
<Exec Command="dotnet publish $(MSBuildThisFileDirectory)$(DumpSolutionName).sln --configuration Debug -o $(MSBuildThisFileDirectory)..\.out -p:Publishing=true -p:SignAssembly=false --framework net6.0"></Exec>
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFramework Condition="'$(Publishing)' == 'true'">net462</TargetFramework>
<RootNamespace>GxCryptography</RootNamespace>
<NoWarn>618;1607;1698;SYSLIB0021;SYSLIB0027;SYSLIB0028;SYSLIB0023</NoWarn>
<AssemblyName>GxCryptography</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFramework Condition="'$(Publishing)' == 'true'">net462</TargetFramework>
<RootNamespace>GxCryptographyCommon</RootNamespace>
<NoWarn>618;1607;1698</NoWarn>
<AssemblyName>GxCryptographyCommon</AssemblyName>
Expand Down
3 changes: 1 addition & 2 deletions dotnet/src/dotnetcommon/GxEncrypt/GxEncrypt.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFramework Condition="'$(Publishing)' == 'true'">net462</TargetFramework>
<RootNamespace>GeneXus.Encryption</RootNamespace>
<AssemblyName>GxEncrypt</AssemblyName>
<PackageTags>Encrypt64 Decrypt64</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
<ProjectReference Include="..\GxClasses\GxClasses.csproj"/>
</ItemGroup>

<ItemGroup>
<Content Include="net6.0\$(MSBuildProjectName).deps.json">
<Pack>true</Pack>
<PackagePath>\content\net6.0\</PackagePath>
</Content>
</ItemGroup>
<Target Name="CustomContentTarget">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)\$(MSBuildProjectName).deps.json">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
</Reference>
</ItemGroup>

<ItemGroup>
<Content Include="net6.0\$(MSBuildProjectName).deps.json">
<Pack>true</Pack>
<PackagePath>\content\net6.0\</PackagePath>
</Content>
</ItemGroup>
<Target Name="CustomContentTarget">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)\$(MSBuildProjectName).deps.json">
Expand Down
8 changes: 1 addition & 7 deletions dotnet/src/dotnetcore/Reor/Reor.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<OutputType>Exe</OutputType>
Expand Down Expand Up @@ -28,10 +28,4 @@
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
<ItemGroup>
<Content Include="net6.0\$(MSBuildProjectName).deps.json">
<Pack>true</Pack>
<PackagePath>\content\net6.0\</PackagePath>
</Content>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFrameworks>net6.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<IsPublishable>false</IsPublishable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.11" />
Expand Down