Skip to content

Commit

Permalink
Merge pull request #5 from thiagoloureiro/feature/vs2019
Browse files Browse the repository at this point in the history
VS 2009 Support
  • Loading branch information
thiagoloureiro authored Apr 2, 2019
2 parents 82b49e1 + 84e8cbc commit 060a8f1
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 61 deletions.
17 changes: 9 additions & 8 deletions Dapper.Crud.Tests/Dapper.Crud.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Dapper.Crud.Tests</RootNamespace>
<AssemblyName>Dapper.Crud.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
Expand All @@ -18,6 +18,7 @@
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -37,10 +38,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
<PackageReference Include="xunit">
<Version>2.4.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.abstractions">
<Version>2.0.3</Version>
Expand All @@ -49,16 +50,16 @@
<Version>0.10.0</Version>
</PackageReference>
<PackageReference Include="xunit.assert">
<Version>2.4.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.core">
<Version>2.4.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.extensibility.core">
<Version>2.4.0</Version>
<Version>2.4.1</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.4.0</Version>
<Version>2.4.1</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
26 changes: 10 additions & 16 deletions Dapper.Crud.VSExtension/CreateCrudPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Threading;
using Task = System.Threading.Tasks.Task;

namespace Dapper.Crud.VSExtension
{
[PackageRegistration(UseManagedResourcesOnly = true)]
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About
[ProvideMenuResource("Menus.ctmenu", 1)]
[Guid(CreateCrudPackage.PackageGuidString)]
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "pkgdef, VS and vsixmanifest are valid VS terms")]
public sealed class CreateCrudPackage : Package
public sealed class CreateCrudPackage : AsyncPackage
{
public DTE2 Dte;

Expand All @@ -23,24 +25,16 @@ public sealed class CreateCrudPackage : Package
/// </summary>
public const string PackageGuidString = "cb7802c6-dd51-4368-ad9a-413841cf0287";

/// <summary>
/// Initializes a new instance of the <see cref="CreateCrud"/> class.
/// </summary>
public CreateCrudPackage()
{
}

#region Package Members

/// <summary>
/// Initialization of the package; this method is called right after the package is sited, so this is the place
/// where you can put all the initialization code that rely on services provided by VisualStudio.
/// </summary>
protected override void Initialize()
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
{
// When initialized asynchronously, the current thread may be a background thread at this point.
// Do any initialization that requires the UI thread after switching to the UI thread.
await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
CreateCrud.Initialize(this);
base.Initialize();
Dte = GetService(typeof(DTE)) as DTE2;
await base.InitializeAsync(cancellationToken, progress);
Dte = await GetServiceAsync(typeof(DTE)) as DTE2;
Instance = this;
Logger.Initialize(this, "Dapper CRUD Generator");
}
Expand Down
23 changes: 12 additions & 11 deletions Dapper.Crud.VSExtension/Dapper.Crud.VSExtension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<UseCodebase>true</UseCodebase>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand All @@ -25,7 +26,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Dapper.Crud.VSExtension</RootNamespace>
<AssemblyName>Dapper.Crud.VSExtension</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<GeneratePkgDefFile>true</GeneratePkgDefFile>
<IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
<IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
Expand Down Expand Up @@ -307,25 +308,25 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapper.Contrib">
<Version>1.50.5</Version>
<Version>1.60.1</Version>
</PackageReference>
<PackageReference Include="IdeaTech.System.Web.Mvc.Extensions">
<Version>1.0.5</Version>
<Version>1.0.7</Version>
</PackageReference>
<PackageReference Include="Microsoft.AspNet.Web.Optimization">
<Version>1.1.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.Net.Compilers">
<Version>2.9.0</Version>
<Version>3.0.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.CoreUtility" Version="15.8.525" />
<PackageReference Include="Microsoft.VisualStudio.Imaging" Version="15.8.28010" />
<PackageReference Include="Microsoft.VisualStudio.CoreUtility" Version="16.0.467" />
<PackageReference Include="Microsoft.VisualStudio.Imaging" Version="16.0.28729" />
<PackageReference Include="Microsoft.VisualStudio.OLE.Interop" Version="7.10.6071" />
<PackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.27" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="15.8.28010" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Framework" Version="15.8.28010" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="16.0.28729" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Framework" Version="16.0.28729" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop" Version="7.10.6072" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.10.0" Version="10.0.30320" />
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.11.0" Version="11.0.61031" />
Expand All @@ -334,10 +335,10 @@
<PackageReference Include="Microsoft.VisualStudio.Shell.Interop.9.0" Version="9.0.30730" />
<PackageReference Include="Microsoft.VisualStudio.TextManager.Interop" Version="7.10.6071" />
<PackageReference Include="Microsoft.VisualStudio.TextManager.Interop.8.0" Version="8.0.50728" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="15.8.168" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" Version="15.8.28010" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.0.102" />
<PackageReference Include="Microsoft.VisualStudio.Utilities" Version="16.0.28729" />
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="15.3.58" />
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="15.8.3252">
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="16.0.2264">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions Dapper.Crud.VSExtension/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("2.8.1.0")]
[assembly: AssemblyFileVersion("2.8.1.0")]
[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
2 changes: 1 addition & 1 deletion Dapper.Crud.VSExtension/VSPackage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions Dapper.Crud.VSExtension/app.config
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="aspnet:RoslynCompilerLocation" value="roslyn" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="aspnet:RoslynCompilerLocation" value="roslyn"/>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
</appSettings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Threading" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
<assemblyIdentity name="Microsoft.VisualStudio.Threading" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Validation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
<assemblyIdentity name="Microsoft.VisualStudio.Validation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.Utilities" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
<assemblyIdentity name="Microsoft.VisualStudio.Utilities" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualStudio.CoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
<assemblyIdentity name="Microsoft.VisualStudio.CoreUtility" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
</providers>
</roleManager>
</system.web>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>
2 changes: 1 addition & 1 deletion Dapper.Crud.VSExtension/frmExtension.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions Dapper.Crud.VSExtension/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="d7261d0b-5f95-456b-9b6a-b127d9afc8e4" Version="2.8.1" Language="en-US" Publisher="Thiago Loureiro" />
<Identity Id="d7261d0b-5f95-456b-9b6a-b127d9afc8e4" Version="3.0.0" Language="en-US" Publisher="Thiago Loureiro" />
<DisplayName>Dapper Crud Generator</DisplayName>
<Description xml:space="preserve">Generate CRUD easily with Dapper from your existing Models</Description>
<MoreInfo>https://github.com/thiagoloureiro/Dapper.Crud.Extension</MoreInfo>
Expand All @@ -10,16 +10,15 @@
<PreviewImage>Resources\settingsbig.png</PreviewImage>
<Tags>c#, dapper, model, crud, generator</Tags>
</Metadata>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0]" />
</Installation>
<Installation>
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0,)" />
</Installation>
<Dependencies>
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
<Dependency Id="Microsoft.VisualStudio.MPF.15.0" DisplayName="Visual Studio MPF 15.0" d:Source="Installed" Version="[15.0]" />
</Dependencies>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.ToolboxControl" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
Expand Down

0 comments on commit 060a8f1

Please sign in to comment.