eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. 𝗹𝗶𝗻𝗸𝗲𝗱𝗶𝗻.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺, 𝘆𝗼𝘂𝘁𝘂𝗯𝗲.𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸.𝗰𝗼𝗺 and 𝘁𝘄𝗶𝘁𝘁𝗲𝗿 @𝗲𝘅𝗽𝗮𝗻𝗱𝗳𝗿𝗮𝗺𝗲𝘄𝗼𝗿𝗸 and or simply 𝗦𝘁𝗮𝗿/𝘄𝗮𝘁𝗰𝗵 this repository and get notified from 𝗚𝗶𝘁𝗛𝘂𝗯
http://expand.expandframework.com
Microsoft Public License
220 stars 114 forks source link

Xpand.XAF.ModelEditor blocked file bin\Debug\net6.0\****.Module.dll when i try to rebuild the project. #1023

Closed beneton2003 closed 6 months ago

beneton2003 commented 11 months ago

Hello guys. I want to say thank you for everything you done. I have a problem. I am using MS visual studio. I installed Xpand model editor through Extention market using instructions When Xpand.XAF.ModelEditor is opened it's blocked a lot of files when i try to (re)build project. If i close ModelEditor everything work fine. How to use model editor and not to close it every time when i need to rebuild or compile the project?

apobekiaris commented 11 months ago

ME is a standlong app therefore if it is open it will lock the assemblies no workaround. However u may add a script in your project to kill it before build e.g.

<Project Sdk="Microsoft.NET.Sdk">
  <!-- ... existing content ... -->

  <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
    <Exec Command="taskkill /F /IM &quot;XpandMEProcessName.exe&quot; /T" />
  </Target>

  <!-- ... existing content ... -->
</Project>

note xpand has 2 processes one for parsing the solution and one for open the model replace with the latter, do not remember the name right now, use the task manager to get it

beneton2003 commented 11 months ago

So do you think that I can close it on build or rebuild and also open it again after rebuilding is completed?

apobekiaris commented 11 months ago

open it again when u need it that what i meant, I see no reason to spent your time to do that, but in but it is possible. As I said there are 2 processes the one parse the solution and list the projects. The second runs when u double click a project. You can see test command line args at

https://github.com/eXpandFramework/Reactive.XAF/blob/0dddcf6237e52f6e76a43fb924da7ea813eab3b4/tools/Xpand.XAF.ModelEditor/Properties/launchSettings.json#L2-L8

beneton2003 commented 11 months ago

can i post command like: <Target Name="PreBuild" AfterTargets="PreBuildEvent">

how do you think if it work or not?

apobekiaris commented 11 months ago

sorry I am not a compiler :) without testing can only guess and software is not build on guessing but on testing

beneton2003 commented 11 months ago

Thank you very much for your answers my friend!

expand commented 6 months ago

Closing issue for age. Feel free to reopen it at any time.

.Thank you for your contribution.