nobodyiam
nobodyiam

Reputation: 11

Get IVsBuildPropertyStorage2 instance in visual studio extension

I am developing a visual studio extension, and I need to set some msbuild properties in .csproj file. The IVsBuildPropertyStorage interface is able to set properties, but it does not support un-evaluated value, such as $(Configuration). So, I want to get an IVsBuildPropertyStorage2 instance, but I don't know how to get this.

Is there someone can help me?

Upvotes: 1

Views: 171

Answers (1)

Ed Dore
Ed Dore

Reputation: 2109

IVsBuildPropertyStorage is typically implemented by object that implements the project hierarchy (IVsHierarchy). If you can retrieve the IVsHierarchy interface for the given project, you can probably cast it to IVsBuildPropertyStorage or IVsBuildPropertyStorage2.

A quick search on GitHub should result in a good number of examples.

Sincerely,

Upvotes: 1

Related Questions