Forum


HomeHomePremiumPremiumDevelopmentDevelopmentIllegal characters in pathIllegal characters in path
Previous
 
Next
New Post
10/31/2017 11:07 AM
 

Correct Steve. I can try to compile it and see how it goes.

Cheers,

Aderson

 
New Post
11/1/2017 1:16 AM
 

Hi Aderson,

OK I will send the code to you via dropbox.

Steve

 
New Post
11/3/2017 8:09 AM
 

Hello,

I have sort of solved the issue after a lot of experimentation.

I started chopping bits out of the build script until the project would compile successfully then added lines back in until I got the same error again.

These lines gave the error:
    <CreateItem Include="**\*.sqldataprovider">
      <Output TaskParameter="Include"   ItemName="SqlDataProviderFiles" />
    </CreateItem>

    <Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />




I also noticed at the end of the script a couple of lines should remove the temporary working directories the script uses while building the installation:

    <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" />
    <RemoveDir Directories ="$(MSBuildProjectDirectory)\ResourcesZip" />

But the Package and ResourcesZip directory were still present so my suspicion was that their files would be included in the build and possibly cause the errors.

I deleted them and recompiled, after a few attempts the project compiled successfully.

So it seems something caused the build to fail, as it didn't complete it wasn't able to delete the directories and their inclusion in the next build seems to have caused the issue. I haven't been able to work out what would have caused the error in the first place but all is working fine now.

Thank you Aderson for your help, it was very kind of you to check the compilation of the source on your environment. But no idea why the issue didn't occur for you as those directories would have been present.

Best Regards,

Steve.

 

 

 
New Post
11/4/2017 1:43 AM
 

 

Hi Aderson,

I found the cause of the build problem I think.

It seems that just having a particular directory open in Windows Explorer can lock the files displayed:
Error 6 Unable to delete file "C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\Resources.Zip". The process cannot access the file 'C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\Resources.Zip' because it is being used by another process. C:\inetpub\wwwroot\dnn8\Website\DesktopModules\FlexiContent\BuildScripts\ModulePackage.Targets 

In my case, I can cause the build to fail by having the zip files from a previous build displayed in Windows Explorer.
The build fails the first time and gives the file locked error above. But since the build failed, a couple of temporary directories (package and ResourcesZip) which the build creates are not deleted.
These temporary directories are included in the next build causing it to fail with the illegal characters error.

Deleting the temporary directories and closing windows explorer allows the build to run successfully.

So the solution is not to have Windows Explorer open showing the files that the build creates. Though I wonder why Windows Explorer locks the files in the first place.

Another part of the solution would be to delete the temporary directories at the beginning of the build script. If the build did fail it could recover once Windows Explorer's lock is removed.

Though I still can't understand the compilation was successful on your environment because the temporary directories would have been present. But I think I'm getting closer :-)

Steve

 

 

 
New Post
11/4/2017 5:24 AM
 

Hi Steve,

Actually that was my mistake. It wasn't successful. I had complied previously in Debug mode, not in release mode. When I switched to release mode I got the same error as you :(

Aderson

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentIllegal characters in pathIllegal characters in path



Try FREE
30 days money back guaranteed