I have created one add in for add my assemblies dynamically. I have add my assemblies successfully by the following code,
vsproject.References.Add(Assemblyname);
If the target project does not have my assemblies adds successfully. If it have my previous version assemblies ,get the assemblies from the target project (project file) .csproj file. And change the oldversion to newversion and save the project using this code,
Migrate(_project.FullName, versionnumber); _project.Save(_project.FullName);
This migration works sucessfully and target project wants to Reload the project Then I reloaded the target project it works fine.
If I want to Migration and Additional assemblies add into my target project it throws the project unavailable exception. If I reload the target project the exception occured in the following code,
VSProject vsproject = (VSProject)_project.Object;
In this code works fine without modifying my project file. But it not works for modify target project file.
Exception details: project unavailable
Inside of exception: The target project object will be shown below lines,
Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation.
Thanks,
Abbas K