How to reload project in VS with Target command before build
Asked Answered
H

0

6

I am looking for a way to Reload a project OR all projects inside the Solution, with Target node , which is in pre-build events node of .csproj file

<Project>  
...  
<Target Name="BeforeBuild">  
    <!-- Insert tasks to run before build here -->  
</Target>  
<Target Name="AfterBuild">  
    <!-- Insert tasks to run after build here -->  
</Target>  

I already read MSDN reference here and here but i could not find a way to reload project. I just know if sth can change .csproj file, IDE automatically reload the project.

Any advise for me please?

Does anyone have idea about PreBuildEvent at this part?

<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
       <ErrorText> package(s) that are missing on this computer. </ErrorText>
     </PropertyGroup>
    <Error Condition="!Exists('..\packages\.0.0.2\ />
</Target>

<PropertyGroup>
     <PreBuildEvent>"$(ProjectDir)XXXXXXXXX WHAT TO DO TO RELOAD ??? 

Hafner answered 15/2, 2017 at 17:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.