0

I am currently developing a solution that has two projects on it: one is some kind of API where I put all the functions that I want to use in the second.

So, at some point in the project, I need to create a file programatically. This is ok, but I need to include that file in my second project to use the functions from the first projects! Any idea on how to do this?

I have tried the EnvDTE but I think it only works if you are creating a new solution and a new project.

Really need help on this! Thanks in advance! :)

1 Answer 1

2

Are you literally trying to recompile the second project after creating these files or is this all happening at runtime?

To me it sounds like what you're trying to do is really not create a file but to emit a class in memory during runtime to make new functions available to the second executable. You should check out Reflection.Emit. That is how you define classes, even assemblies, that didn't exist when you started running the program. Check out MSDN and this code project article.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.