turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 156 forks source link

Update for VS2015. Removing a bug from _getCurrentProject() (Project … #282

Open cigano opened 7 years ago

cigano commented 7 years ago

…was null in some cases).

turquoiseowl commented 7 years ago

Hi, thanks for the PR. Quite a big one! Can you elaborate pls on the objective?

cigano commented 7 years ago

Hi, Martin.

There's a bug on the extension. I replaced the old code by a more robust one that solves the error.

Additionally, I updated the solution based on some other issues I've seen here. Now i18n.POTGenerator works on VS2015 with no problems.

cigano commented 7 years ago

Martin,

I forgot to change an additional manifest file. Now everything is tested and working.

turquoiseowl commented 7 years ago

Hi Cigano, I've just realised most of the changes were a consequence of the backup folder being created which was freaking me out a bit. The commit also does more than one thing which isn't ideal.

Sorry to be anal but it would help if you would resubmit as two separate commits/PRs and also no need for the Backup folder and contents.

Also, do you know if the mods for 2015 VSIX will be backward compatible with VS2013 and even VS2012? If not, how about a separate project for at least VS2013 and VS2015?

Thanks.

cigano commented 7 years ago

Hi, Martin.

You can just ignore the Backup folder. It was included by my mistake. VS generated the folder when I opened the project in VS2015.

By the way, I configured the package to be backwards compatible with VS2012 and VS2013. I used the package with no problems with my students with these modifications.

cigano commented 7 years ago

Yes. VS2015 did that. Not me.

Which minimal version should I set?

turquoiseowl commented 7 years ago

Unfortunately this does seem to break the build on VS2013. Here's the build output:

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
1>------ Rebuild All started: Project: i18n.Domain, Configuration: Debug Any CPU ------
1>  i18n.Domain -> C:\DevRoot\DevGit\i18n\src\i18n.Domain\bin\Debug\i18n.Domain.dll
2>------ Rebuild All started: Project: i18n, Configuration: Debug Any CPU ------
3>------ Rebuild All started: Project: i18n.POTGenerator, Configuration: Debug Any CPU ------
2>  i18n -> C:\DevRoot\DevGit\i18n\src\i18n\bin\Debug\i18n.dll
4>------ Rebuild All started: Project: i18n.PostBuild, Configuration: Debug Any CPU ------
5>------ Rebuild All started: Project: i18n.Domain.Tests, Configuration: Debug Any CPU ------
6>------ Rebuild All started: Project: i18n.Adapter.OwinSystemWeb, Configuration: Debug Any CPU ------
4>  i18n.PostBuild -> C:\DevRoot\DevGit\i18n\src\i18n.PostBuild\bin\Debug\i18n.PostBuild.exe
5>  i18n.Domain.Tests -> C:\DevRoot\DevGit\i18n\src\i18n.Domain.Tests\bin\Debug\i18n.Domain.Tests.dll
7>------ Rebuild All started: Project: i18n.Tests, Configuration: Debug Any CPU ------
6>  i18n.Adapter.OwinSystemWeb -> C:\DevRoot\DevGit\i18n\src\i18n.Adapter.OwinSystemWeb\bin\Debug\i18n.Adapter.OwinSystemWeb.dll
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(34,52,34,59): error CS0433: The type 'Microsoft.VisualStudio.Shell.Package' exists in both 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.Shell.12.0.dll' and 'c:\DevRoot\DevGit\i18n\src\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll'
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(27,6,27,25): error CS0246: The type or namespace name 'PackageRegistration' could not be found (are you missing a using directive or an assembly reference?)
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(27,6,27,25): error CS0433: The type 'Microsoft.VisualStudio.Shell.PackageRegistrationAttribute' exists in both 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.Shell.12.0.dll' and 'c:\DevRoot\DevGit\i18n\src\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll'
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(30,6,30,34): error CS0246: The type or namespace name 'InstalledProductRegistration' could not be found (are you missing a using directive or an assembly reference?)
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(30,6,30,34): error CS0433: The type 'Microsoft.VisualStudio.Shell.InstalledProductRegistrationAttribute' exists in both 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.Shell.12.0.dll' and 'c:\DevRoot\DevGit\i18n\src\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll'
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(32,6,32,25): error CS0246: The type or namespace name 'ProvideMenuResource' could not be found (are you missing a using directive or an assembly reference?)
3>C:\DevRoot\DevGit\i18n\src\i18n.POTGenerator\i18n.POTGeneratorPackage.cs(32,6,32,25): error CS0433: The type 'Microsoft.VisualStudio.Shell.ProvideMenuResourceAttribute' exists in both 'c:\Program Files (x86)\Microsoft Visual Studio 12.0\VSSDK\VisualStudioIntegration\Common\Assemblies\v4.0\Microsoft.VisualStudio.Shell.12.0.dll' and 'c:\DevRoot\DevGit\i18n\src\packages\Microsoft.VisualStudio.Shell.14.0.14.3.25407\lib\Microsoft.VisualStudio.Shell.14.0.dll'
7>  i18n.Tests -> C:\DevRoot\DevGit\i18n\src\i18n.Tests\bin\Debug\i18n.Tests.dll
========== Rebuild All: 6 succeeded, 1 failed, 0 skipped ==========

I don't have time right now to dig into this. Would it be possible to separate out the POTGenerator bug fix from the upgrade? Then possibly have separate projects for the parts that are IDE-specific/sensitive? Or can you fix so it builds on VS2013 and 2015? Thanks.