microsoft / VSSDK-Extensibility-Samples

Samples for building your own Visual Studio extensions
http://aka.ms/extendvs
MIT License
1.22k stars 452 forks source link

Assembly.Name property return different values depending on reference type. #273

Open CartBlanche opened 1 year ago

CartBlanche commented 1 year ago

Installed products

Description

We have a debugging extension, which works correctly (Assembly.Name property has the expected value) when the start-up project uses packages. But doesn't when using project uses project references (is tells me the Assembly.Name for the 2 referenced projects instead. How can I just get the Assembly name for the start-up project and nothing else??

Steps to recreate

Inside mypublic async Task Deploy() I'm doing the following... var generalProperties = await Properties.GetConfigurationGeneralPropertiesAsync(); var name = await generalProperties.Rule.GetPropertyValueAsync("AssemblyName");

Current behaviour

Inside a csproj that, if that project using project references that call returns the assembly name of the project references

Expected behaviour

Returns correct assembly name only for the start-up project. The current csproj being deployed and debugged.