microsoft / xaml-designer-extensibility

Extensibility sample code for the Visual Studio XAML Designer
MIT License
67 stars 29 forks source link

Correct way to change code in CustomControlLibrary.WpfCore.DesignTools project to avoid blocking CustomControlLibrary.WpfCore.DesignTools.dll by IDE. #38

Closed dmitrybv closed 3 years ago

dmitrybv commented 3 years ago

What is the correct way to change code in CustomControlLibrary.WpfCore.DesignTools project? Every time I change code in files of CustomControlLibrary.WpfCore.DesignTools project and try to recompile solution I get the error

Severity    Code    Description Project File    Line    Suppression State
Warning     Unable to delete file "C:\DelphiStuff\DotNet Samples\github-ms-xaml-dsgn-ext\Prj\samples\CustCntLib.WpfCore\CustomControlLibrary.WpfCore\bin\Debug\netcoreapp3.0\CustomControlLibrary.WpfCore.DesignTools.dll". Access to the path 'C:\DelphiStuff\DotNet Samples\github-ms-xaml-dsgn-ext\Prj\samples\CustCntLib.WpfCore\CustomControlLibrary.WpfCore\bin\Debug\netcoreapp3.0\CustomControlLibrary.WpfCore.DesignTools.dll' is denied.  CustomControlLibrary.WpfCore.DesignTools            

So I should to close and reopen Visual Studio to recompile changed code.

Looks like it is a duplicate of issue #13.

dmitrybv commented 3 years ago

One solution I have found is to use an Extension to restart Visual Studio. 'Visual Studio Restart' - https://marketplace.visualstudio.com/items?itemName=PaulMelia.VsRestart001&ssr=false#overview

lutzroeder commented 3 years ago

Duplicate of #13