Skip to content

Commit cc1017c

Browse files
author
dahall
committed
Finished consolidating of Shared into Core by removing errant code and project references. Also had to move VssApi back to v143 build as v145 doesn't compile yet.
1 parent 4b71b1d commit cc1017c

File tree

49 files changed

+29
-156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+29
-156
lines changed

CodeGen/Analyzer/MarshalerStructNoAttr.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Collections.Immutable;
66
using System.Linq;
77
using System.Runtime.InteropServices;
8-
using Vanara.Marshaler;
98

109
/// <summary>A diagnostic analyzer that checks for parameters of type [Marshaled] structures.</summary>
1110
[DiagnosticAnalyzer(LanguageNames.CSharp)]
@@ -36,7 +35,7 @@ private static void AnalyzeNode(SyntaxNodeAnalysisContext context)
3635
// Check if the node is a parameter with a parameter type that has the MarshaledAttribute applied
3736
if (context.Node is ParameterSyntax parameterSyntax &&
3837
context.SemanticModel.GetDeclaredSymbol(parameterSyntax) is IParameterSymbol parameterSymbol &&
39-
parameterSymbol.Type.GetAttributes().Any(attr => attr.AttributeClass?.Name == nameof(MarshaledAttribute)))
38+
parameterSymbol.Type.GetAttributes().Any(attr => attr.AttributeClass?.Name == "MarshaledAttribute"))
4039
{
4140
// Check if the parameter has a MarshalAsAttribute applied
4241
var marshaledAttr = parameterSymbol.GetAttributes().FirstOrDefault(attr => attr.AttributeClass?.Name == nameof(MarshalAsAttribute));

CodeGen/Analyzer/SafeHandleNullAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Collections.Generic;
66
using System.Collections.Immutable;
77

8-
/// <summary>Analyzer for supplying <see langword="null"/> as a value for a <see cref="Vanara.PInvoke.SafeHANDLE"/> typed argument.</summary>
8+
/// <summary>Analyzer for supplying <see langword="null"/> as a value for a <c>Vanara.PInvoke.SafeHANDLE</c> typed argument.</summary>
99
[DiagnosticAnalyzer(LanguageNames.CSharp)]
1010
public class SafeHANDLENullAnalyzer : DiagnosticAnalyzer
1111
{

CodeGen/Analyzer/Vanara.CodeGen.Analyzer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
</PackageReference>
1919
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
2020
</ItemGroup>
21-
<ItemGroup>
21+
<!--<ItemGroup>
2222
<ProjectReference Include="..\..\Core\Vanara.Core.csproj" OutputItemType="Analyzer" />
23-
</ItemGroup>
23+
</ItemGroup>-->
2424
<ItemGroup>
2525
<Compile Update="Resources.Designer.cs" DesignTime="True" AutoGen="True" DependentUpon="Resources.resx" />
2626
<EmbeddedResource Update="Resources.resx" Generator="ResXFileCodeGenerator" LastGenOutput="Resources.Designer.cs" />

Core/Vanara.Core.csproj

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<AssemblyTitle>$(AssemblyName)</AssemblyTitle>
1717
<AssemblyName>Vanara.Core</AssemblyName>
1818
<PackageId>$(AssemblyName)</PackageId>
19-
<PackageTags>vanara;net-extensions;interop</PackageTags>
19+
<PackageTags>vanara;net-extensions;interop;pinvoke</PackageTags>
2020
<PackageReleaseNotes>Currently implements:
2121

2222
Classes
@@ -37,6 +37,12 @@ ArrayLayout, Bitness, CorrespondingAction, FileAttributeConstant, FileOpConstant
3737
<ItemGroup Condition=" $(NETSTANDARD2_1) ">
3838
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
3939
</ItemGroup>
40+
<ItemGroup>
41+
<None Remove="handles.csv" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<AdditionalFiles Include="handles.csv" />
45+
</ItemGroup>
4046
<ItemGroup>
4147
<Compile Remove="InteropServices\SafeIDispatch.cs" />
4248
<Compile Remove="InteropServices\StructMarshaler.cs" />
@@ -69,6 +75,12 @@ ArrayLayout, Bitness, CorrespondingAction, FileAttributeConstant, FileOpConstant
6975
<LastGenOutput>SafeLPSTR.cs</LastGenOutput>
7076
</None>
7177
</ItemGroup>
78+
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcore'))">
79+
<PackageReference Include="Microsoft.Win32.Registry" />
80+
</ItemGroup>
81+
<ItemGroup>
82+
<PackageReference Include="System.ComponentModel.Annotations" Condition=" $(NET40_OR_GREATER) Or $(NETSTANDARD2_0) Or $(NETSTANDARD2_1) " />
83+
</ItemGroup>
7284
<ItemGroup>
7385
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
7486
</ItemGroup>

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
</PropertyGroup>
2626

2727
<!-- Custom generator -->
28-
<ItemGroup Condition="'$(MSBuildProjectName)'!='Vanara.Core' And !$(MSBuildProjectName.StartsWith('Vanara.CodeGen'))">
28+
<ItemGroup Condition="!$(MSBuildProjectName.StartsWith('Vanara.CodeGen'))">
2929
<ProjectReference Include="$(MSBuildThisFileDirectory)CodeGen\Generator\Vanara.CodeGen.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" PrivateAssets="all" />
3030
<ProjectReference Include="$(MSBuildThisFileDirectory)CodeGen\Analyzer\Vanara.CodeGen.Analyzer.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
3131
<ProjectReference Include="$(MSBuildThisFileDirectory)CodeGen\CodeFixes\Vanara.CodeGen.CodeFixes.csproj" ReferenceOutputAssembly="false" OutputItemType="Analyzer" />
32-
<ProjectReference Include="$(MSBuildThisFileDirectory)Core\Vanara.Core.csproj" OutputItemType="Analyzer" />
32+
<ProjectReference Include="$(MSBuildThisFileDirectory)Core\Vanara.Core.csproj" OutputItemType="Analyzer" Condition="'$(MSBuildProjectName)'!='Vanara.Core'"/>
3333
</ItemGroup>
3434
<PropertyGroup Condition="'$(MSBuildProjectExtension)'=='.csproj'">
3535
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

PInvoke/AMSI/Vanara.PInvoke.AMSI.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,4 @@ IAmsiStream IAntimalware IAntimalware2 IAntimalwareProvider IAntimalwareProvider
2626
<ItemGroup>
2727
<AdditionalFiles Include="handles.csv" />
2828
</ItemGroup>
29-
<ItemGroup>
30-
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
31-
</ItemGroup>
3229
</Project>

PInvoke/Accessibility/Vanara.PInvoke.Accessibility.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,4 @@ AccessibleChildren AccessibleObjectFromEvent AccessibleObjectFromPoint Accessibl
2727
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
2828
<UseWindowsForms>true</UseWindowsForms>
2929
</PropertyGroup>
30-
<ItemGroup>
31-
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
32-
</ItemGroup>
3330
</Project>

PInvoke/Avrt/Vanara.PInvoke.Avrt.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,4 @@ HAVRT
2020
</PackageReleaseNotes>
2121
<PackageReadmeFile>pkgreadme.md</PackageReadmeFile>
2222
</PropertyGroup>
23-
<ItemGroup>
24-
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
25-
</ItemGroup>
2623
</Project>

PInvoke/BITS/Vanara.PInvoke.BITS.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,4 @@ IBackgroundCopyCallback IBackgroundCopyCallback2 IBackgroundCopyCallback3 IBackg
2020
</PackageReleaseNotes>
2121
<PackageReadmeFile>pkgreadme.md</PackageReadmeFile>
2222
</PropertyGroup>
23-
<ItemGroup>
24-
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
25-
</ItemGroup>
2623
</Project>

PInvoke/Cabinet/Vanara.PInvoke.Cabinet.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,4 @@ CCAB COMPRESSOR_HANDLE COMPRESS_ALLOCATION_ROUTINES DECOMPRESSOR_HANDLE DECRYPT
2626
<ItemGroup>
2727
<AdditionalFiles Include="handles.csv" />
2828
</ItemGroup>
29-
<ItemGroup>
30-
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
31-
</ItemGroup>
3229
</Project>

0 commit comments

Comments
 (0)