I am working on a POC and have the following scenario:
I am using DTE to write a file. I have a string in memory that contains the file data.
The "AddFromFile" accepts a string representing the location of the file, retrieves it, and adds it to the project.
I can make this work by:
- Taking my string in memory and creating a temporary file
- Using the AddFromFile method to copy the temporary file
It seems to me it would be more efficient to have the ProjectItem.AddFromFile use the filedata in my string directly (avoiding the temp file), but have not been able to figure out how to get this to work.
Any suggestions on how to do this? Or, alternatively, is there a better solution than DTE?
Thanks