Rubberduck: Evaluate (and perform) csproj format update

Created on 18 Apr 2018  路  8Comments  路  Source: rubberduck-vba/Rubberduck

The csproj files are a regular source of pain for pull-requests dealing with moving stuff around and just general development.
MS did add a new csproj format that can use globbing and other cool (read: basic) features that are useful for remotely human readable project control.

The following guide can help migrate an old configuration to a new one: https://www.natemcmaster.com/blog/2017/03/09/vs2015-to-vs2017-upgrade/

difficulty-02-ducky discussion technical-debt up-for-grabs

Most helpful comment

I think we are forced to use VS2017 for some time already because we are using C#7.1 and VS does not ship with a compiler for it prior to VS2017.

All 8 comments

Just a word of caution, this change will break compatibility with VS2013 & VS2015.

If we do this, all contributors need to be using the latest version of Visual Studio.

I think we are forced to use VS2017 for some time already because we are using C#7.1 and VS does not ship with a compiler for it prior to VS2017.

note that for our wpf stuff. https://github.com/dotnet/sdk/issues/491 might be relevant

Ok. Cool. I know I鈥檓 out of the loop. Just wanted to make sure we didn鈥檛 break any contributors. It鈥檚 because of y鈥檃ll I don鈥檛 have to worry about the project after all.

You can give this converter a go if you like. It's just had WPF support added. This nearly merged pull request should lead to a really neat project file afterwards, though it's pretty easy to manually tidy up anyway.

That PR is now merged. Updating the readme now on how to use as a net core global tool 馃槃

I've been battling MSBuild for a few hours now to migrate at least some of the satellite assemblies to the new csproj format. Rubberduck.Deployment has been a bit ... resistant, though.

I'm not sure what to make of the following error that shows when trying to run tlbexp on Rubberduck.dll for the 64-bit tlb:

3>Running tlbexp.exe
3>cmd = C:\Program Files (x86)\Microsoft SDKs\Windowsv10.0Abin\NETFX 4.6.1 Tools\tlbexp.exe
3>Microsoft (R) .NET Framework Assembly to Type Library Converter 4.6.1055.0
3>Copyright (C) Microsoft Corporation. All rights reserved.
3>
3>Assembly exported to 'F:[..]\Rubberduck\Rubberduck.Deploymentbin\Debugnet46\Rubberduck.x32.tlb'
3>Generated 32-bit TLB
3>Microsoft (R) .NET Framework Assembly to Type Library Converter 4.6.1055.0
3>Copyright (C) Microsoft Corporation. All rights reserved.
3>
3>F:[..]\Rubberduck\Rubberduck.Deployment\BuildRegistryScript.ps1 :
3>TlbExp : warning TX00131175: When cross-compiling, all type library references should be
3>included on the command line to ensure the correct bit-specific type libraries are loaded.
3>In Zeile:1 Zeichen:1
3>+ & 'F:[..]\Rubberduck\Rubberduck.Deployment\ ...
3>+ ~~~~~~~~~~~~~~
3> + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
3> + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,BuildRegistryScript.ps1
3>
3>F:[..]\Rubberduck\Rubberduck.Deployment\Rubberduck.Deployment.csproj(78,5): error MSB3073: The command "%SystemRoot%\System32\WindowsPowerShellv1.0\powershell.exe -ExecutionPolicy Bypass -command "& 'F:[..]\Rubberduck\Rubberduck.Deployment\BuildRegistryScript.ps1' -config 'Debug' -builderAssemblyPath 'F:[..]\Rubberduck\Rubberduck.Deploymentbin\Debugnet46\Rubberduck.Deployment.dll' -netToolsDir 'C:\Program Files (x86)\Microsoft SDKs\Windowsv10.0Abin\NETFX 4.6.1 Tools\' -wixToolsDir 'F:[..]\Rubberduck\Rubberduck.Deployment\WixToolset\' -sourceDir 'F:[..]\Rubberduck\Rubberduck.Deploymentbin\Debugnet46\' -targetDir 'F:[..]\Rubberduck\Rubberduck.Deploymentbin\Debugnet46\' -projectDir 'F:[..]\Rubberduck\Rubberduck.Deployment\' -includeDir 'F:[..]\Rubberduck\Rubberduck.Deployment\InnoSetup\Includes\' -filesToExtract 'Rubberduck.dll|Rubberduck.API.dll'"" exited with code 1.
3>Done building project "Rubberduck.Deployment.csproj" -- FAILED.

Any help is appreciated

I feel like there's missing data in there. For one thing, it's not all that clear whether it's actually erroring with the TLB generation. It might be actually failing on the heat.exe at line 223.

Note that the error before the separator is cut off:

3>+ & 'F:[..]\Rubberduck\Rubberduck.Deployment\ ...

and that isn't the path to the SDK where the tlbexp.exe would be defined. However, heat.exe would be a package within the Rubberduck project's packages folder.

I would uncomment the lines 161-175 and verify that all the variables are sane and perhaps test with manual execution of the tools in the script to see if the error can be reproduced.

Was this page helpful?
0 / 5 - 0 ratings