Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-302
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sajani Samarakkody
2022-302
Commits
be797d44
Commit
be797d44
authored
May 19, 2022
by
Sajani Samarakkody
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
f1d61c7a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
232 additions
and
0 deletions
+232
-0
Automation Drug Managment/.vs/Automation Drug Managment/v16/.suo
...ion Drug Managment/.vs/Automation Drug Managment/v16/.suo
+0
-0
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/.signature.p7s
...Dom.Providers.DotNetCompilerPlatform.2.0.1/.signature.p7s
+0
-0
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.nupkg
...soft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.nupkg
+0
-0
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
...CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
+5
-0
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props
.../Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props
+111
-0
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net46/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
...CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
+5
-0
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net46/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props
.../Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props
+111
-0
No files found.
Automation Drug Managment/.vs/Automation Drug Managment/v16/.suo
0 → 100644
View file @
be797d44
File added
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/.signature.p7s
0 → 100644
View file @
be797d44
File added
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1.nupkg
0 → 100644
View file @
be797d44
File added
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
0 → 100644
View file @
be797d44
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RoslynToolPath Condition=" '$(RoslynToolPath)' == '' ">$(MSBuildThisFileDirectory)..\..\tools\roslyn45</RoslynToolPath>
</PropertyGroup>
</Project>
\ No newline at end of file
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props
0 → 100644
View file @
be797d44
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props"/>
<ItemGroup>
<RoslynCompilerFiles Include="$(RoslynToolPath)\*">
<Link>roslyn\%(RecursiveDir)%(Filename)%(Extension)</Link>
</RoslynCompilerFiles>
</ItemGroup>
<Target Name="IncludeRoslynCompilerFilesToFilesForPackagingFromProject" BeforeTargets="PipelineCollectFilesPhase" >
<ItemGroup>
<FilesForPackagingFromProject Include="@(RoslynCompilerFiles)">
<DestinationRelativePath>bin\roslyn\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
<FromTarget>IncludeRoslynCompilerFilesToFilesForPackagingFromProject</FromTarget>
<Category>Run</Category>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<Target Name="LocateRoslynToolsDestinationFolder" Condition=" '$(RoslynToolsDestinationFolder)' == '' ">
<PropertyGroup>
<RoslynToolsDestinationFolder>$(WebProjectOutputDir)\bin\roslyn</RoslynToolsDestinationFolder>
<RoslynToolsDestinationFolder Condition=" '$(WebProjectOutputDir)' == '' ">$(OutputPath)\roslyn</RoslynToolsDestinationFolder>
</PropertyGroup>
</Target>
<Target Name="CopyRoslynCompilerFilesToOutputDirectory" AfterTargets="CopyFilesToOutputDirectory" DependsOnTargets="LocateRoslynToolsDestinationFolder">
<Copy SourceFiles="@(RoslynCompilerFiles)" DestinationFolder="$(RoslynToolsDestinationFolder)" ContinueOnError="true" SkipUnchangedFiles="true" Retries="0" />
<ItemGroup Condition="'$(MSBuildLastTaskResult)' == 'True'" >
<FileWrites Include="$(RoslynToolsDestinationFolder)\*" />
</ItemGroup>
</Target>
<Target Name="CheckIfShouldKillVBCSCompiler">
<CheckIfVBCSCompilerWillOverride src="$(RoslynToolPath)\VBCSCompiler.exe" dest="$(RoslynToolsDestinationFolder)\VBCSCompiler.exe">
<Output TaskParameter="WillOverride" PropertyName="ShouldKillVBCSCompiler" />
</CheckIfVBCSCompilerWillOverride>
</Target>
<Target Name = "KillVBCSCompilerBeforeCopy" BeforeTargets="CopyRoslynCompilerFilesToOutputDirectory" DependsOnTargets="LocateRoslynToolsDestinationFolder;CheckIfShouldKillVBCSCompiler" >
<KillProcess ProcessName="VBCSCompiler" ImagePath="$(RoslynToolsDestinationFolder)" Condition="'$(ShouldKillVBCSCompiler)' == 'True'" />
</Target>
<Target Name = "KillVBCSCompilerBeforeClean" AfterTargets="BeforeClean" DependsOnTargets="LocateRoslynToolsDestinationFolder">
<KillProcess ProcessName="VBCSCompiler" ImagePath="$(RoslynToolsDestinationFolder)" />
</Target>
<UsingTask TaskName="KillProcess" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<ProcessName ParameterType="System.String" Required="true" />
<ImagePath ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System" />
<Reference Include="System.Management" />
<Using Namespace="System" />
<Using Namespace="System.Linq" />
<Using Namespace="System.Diagnostics" />
<Using Namespace="System.Management" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try
{
foreach(var p in Process.GetProcessesByName(ProcessName))
{
var wmiQuery = "SELECT ProcessId, ExecutablePath FROM Win32_Process WHERE ProcessId = " + p.Id;
using(var searcher = new ManagementObjectSearcher(wmiQuery))
{
using(var results = searcher.Get())
{
var mo = results.Cast<ManagementObject>().FirstOrDefault();
if(mo != null)
{
var path = (string)mo["ExecutablePath"];
var executablePath = path != null ? path : string.Empty;
Log.LogMessage("ExecutablePath is {0}", executablePath);
if(executablePath.StartsWith(ImagePath, StringComparison.OrdinalIgnoreCase))
{
p.Kill();
p.WaitForExit();
Log.LogMessage("{0} is killed", executablePath);
break;
}
}
}
}
}
}
catch (Exception ex)
{
Log.LogWarning(ex.Message);
}
return true;
]]>
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="CheckIfVBCSCompilerWillOverride" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Src ParameterType="System.String" Required="true" />
<Dest ParameterType="System.String" Required="true" />
<WillOverride ParameterType="System.Boolean" Output="true" />
</ParameterGroup>
<Task>
<Reference Include="System.IO" />
<Code Type="Fragment" Language="cs">
<![CDATA[
WillOverride = false;
try {
WillOverride = File.Exists(Src) && File.Exists(Dest) && (File.GetLastWriteTime(Src) != File.GetLastWriteTime(Dest));
}
catch { }
]]>
</Code>
</Task>
</UsingTask>
</Project>
\ No newline at end of file
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net46/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props
0 → 100644
View file @
be797d44
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RoslynToolPath Condition=" '$(RoslynToolPath)' == '' ">$(MSBuildThisFileDirectory)..\..\tools\roslynlatest</RoslynToolPath>
</PropertyGroup>
</Project>
\ No newline at end of file
Automation Drug Managment/packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1/build/net46/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props
0 → 100644
View file @
be797d44
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Extensions.props"/>
<ItemGroup>
<RoslynCompilerFiles Include="$(RoslynToolPath)\*">
<Link>roslyn\%(RecursiveDir)%(Filename)%(Extension)</Link>
</RoslynCompilerFiles>
</ItemGroup>
<Target Name="IncludeRoslynCompilerFilesToFilesForPackagingFromProject" BeforeTargets="PipelineCollectFilesPhase" >
<ItemGroup>
<FilesForPackagingFromProject Include="@(RoslynCompilerFiles)">
<DestinationRelativePath>bin\roslyn\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
<FromTarget>IncludeRoslynCompilerFilesToFilesForPackagingFromProject</FromTarget>
<Category>Run</Category>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<Target Name="LocateRoslynToolsDestinationFolder" Condition=" '$(RoslynToolsDestinationFolder)' == '' ">
<PropertyGroup>
<RoslynToolsDestinationFolder>$(WebProjectOutputDir)\bin\roslyn</RoslynToolsDestinationFolder>
<RoslynToolsDestinationFolder Condition=" '$(WebProjectOutputDir)' == '' ">$(OutputPath)\roslyn</RoslynToolsDestinationFolder>
</PropertyGroup>
</Target>
<Target Name="CopyRoslynCompilerFilesToOutputDirectory" AfterTargets="CopyFilesToOutputDirectory" DependsOnTargets="LocateRoslynToolsDestinationFolder">
<Copy SourceFiles="@(RoslynCompilerFiles)" DestinationFolder="$(RoslynToolsDestinationFolder)" ContinueOnError="true" SkipUnchangedFiles="true" Retries="0" />
<ItemGroup Condition="'$(MSBuildLastTaskResult)' == 'True'" >
<FileWrites Include="$(RoslynToolsDestinationFolder)\*" />
</ItemGroup>
</Target>
<Target Name="CheckIfShouldKillVBCSCompiler">
<CheckIfVBCSCompilerWillOverride src="$(RoslynToolPath)\VBCSCompiler.exe" dest="$(RoslynToolsDestinationFolder)\VBCSCompiler.exe">
<Output TaskParameter="WillOverride" PropertyName="ShouldKillVBCSCompiler" />
</CheckIfVBCSCompilerWillOverride>
</Target>
<Target Name = "KillVBCSCompilerBeforeCopy" BeforeTargets="CopyRoslynCompilerFilesToOutputDirectory" DependsOnTargets="LocateRoslynToolsDestinationFolder;CheckIfShouldKillVBCSCompiler" >
<KillProcess ProcessName="VBCSCompiler" ImagePath="$(RoslynToolsDestinationFolder)" Condition="'$(ShouldKillVBCSCompiler)' == 'True'" />
</Target>
<Target Name = "KillVBCSCompilerBeforeClean" AfterTargets="BeforeClean" DependsOnTargets="LocateRoslynToolsDestinationFolder">
<KillProcess ProcessName="VBCSCompiler" ImagePath="$(RoslynToolsDestinationFolder)" />
</Target>
<UsingTask TaskName="KillProcess" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<ProcessName ParameterType="System.String" Required="true" />
<ImagePath ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System" />
<Reference Include="System.Management" />
<Using Namespace="System" />
<Using Namespace="System.Linq" />
<Using Namespace="System.Diagnostics" />
<Using Namespace="System.Management" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try
{
foreach(var p in Process.GetProcessesByName(ProcessName))
{
var wmiQuery = "SELECT ProcessId, ExecutablePath FROM Win32_Process WHERE ProcessId = " + p.Id;
using(var searcher = new ManagementObjectSearcher(wmiQuery))
{
using(var results = searcher.Get())
{
var mo = results.Cast<ManagementObject>().FirstOrDefault();
if(mo != null)
{
var path = (string)mo["ExecutablePath"];
var executablePath = path != null ? path : string.Empty;
Log.LogMessage("ExecutablePath is {0}", executablePath);
if(executablePath.StartsWith(ImagePath, StringComparison.OrdinalIgnoreCase))
{
p.Kill();
p.WaitForExit();
Log.LogMessage("{0} is killed", executablePath);
break;
}
}
}
}
}
}
catch (Exception ex)
{
Log.LogWarning(ex.Message);
}
return true;
]]>
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="CheckIfVBCSCompilerWillOverride" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Src ParameterType="System.String" Required="true" />
<Dest ParameterType="System.String" Required="true" />
<WillOverride ParameterType="System.Boolean" Output="true" />
</ParameterGroup>
<Task>
<Reference Include="System.IO" />
<Code Type="Fragment" Language="cs">
<![CDATA[
WillOverride = false;
try {
WillOverride = File.Exists(Src) && File.Exists(Dest) && (File.GetLastWriteTime(Src) != File.GetLastWriteTime(Dest));
}
catch { }
]]>
</Code>
</Task>
</UsingTask>
</Project>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment