SDK: How to load VS solution from scratch

Hello,

I need to do a sort of code merger that will look for certain changes in a branch of code and apply them in another copy of the code. The changes I'm looking for are just attributes added to certain methods and properties so this seems to be quite simple. The rest of the code is very different so doing a text based merge is complex.

I was planning to do this as a code cleanup module. Does this make sense?

What I don't know how to do is to load a separate Visual Studio project or Solution File. I'm going to have 2 sets of code, one is already open in VS but I need to load another solution file from scrath so I can compare both code sets. Is this possible?


Thanks

2 comments
Comment actions Permalink

This isn't something that ReSharper is set up to do. Its project model is based on the Visual Studio project model, and while we can "augment" that with various "hidden" files (e.g. JavaScript or TypeScript files to add global variables, etc.) we don't have any facility to add a fake project or second solution that you could then compare against.

0
Comment actions Permalink

Hello,

Theoretically it's possible to open the second sandboxed solution instance
(which won't be integrated with Visual Studio at all), but there might be
per-solution components which don't behave so correctly when there're two
of them in the single Visual Studio instance. And either way it's not a well-tested
setup.

Would be better to open the solutions in turn, first one then another, collecting
the info on the first and then applying to the second. Or, if you're not
to close the main solution, could have a run on it with R# Command Line Tools
which also supports plugins, to collect the necessary data in an out-of-process
fashion.
Or, if that codebase is available in compiled form, it would be easy to read
attributes from the DLLs with either .NET Reflection or the MetadataLoader.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.