In Visual Studio, can I add an add-in as a reference to another assembly in the solution?

I am using Visual Studio 2010. I have several C # projects in my solution. One project is an Excel add-in. I want to be able to write unit tests for some of the code that I have in an Excel add-in project. For this, I created another project in the solution. I want this test project to be able to reference the add-in project. However, the add-in project does not appear on the Projects tab of the Add Link dialog box. The only way I was able to do something was to add the Add-In DLL file as a link in the test project. This is not ideal, because a new dll should be created whenever changes occur in the Add-In project. Is this a limitation of Excel add-in projects? Or do I need to set up an Excel add-in project in a certain wayto make it visible to a test project?

+3
source share
1 answer

Why don't you just create test classes in a different namespace in excel addin?

ExcelAddin.Tests

If you are not familiar with namespaces, look here: http://msdn.microsoft.com/en-us/library/z2kcy19k(VS.80).aspx

0
source

Source: https://habr.com/ru/post/1775523/


All Articles