If the project name ends with the string '.csproj' and subsequently is placed into a folder structure with '.csproj', and the project file's name ends with '.csproj.csproj', then the following error is produced.
PS C:\Users\qwsdc\source\repos\aeqw89.xml.csproj\aeqw89.xml.csproj> publish increment patch local-packages
Something went wrong loading this file; System.UnauthorizedAccessException: Access to the path 'C:\Users\qwsdc\source\repos\aeqw89.xml.csproj\aeqw89.xml.csproj' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at aeqw89.tools.Publish.Project.Load(String path)
at aeqw89.tools.Publish.ProjectFile.TryLoad(String path, ProjectFile& projectFile, String& error)
Replication
Create a new solution with one project, titled "aeqw89.xml.csproj". (or anything that has .csproj at the end)
Unload solution (not necessary, but removes potential for IDE to be locking the project file)
Run in terminal 'publish overwrite local-packages'
### Summary
If the project name ends with the string '.csproj' and subsequently is placed into a folder structure with '.csproj', and the project file's name ends with '.csproj.csproj', then the following error is produced.
```
PS C:\Users\qwsdc\source\repos\aeqw89.xml.csproj\aeqw89.xml.csproj> publish increment patch local-packages
Something went wrong loading this file; System.UnauthorizedAccessException: Access to the path 'C:\Users\qwsdc\source\repos\aeqw89.xml.csproj\aeqw89.xml.csproj' is denied.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at aeqw89.tools.Publish.Project.Load(String path)
at aeqw89.tools.Publish.ProjectFile.TryLoad(String path, ProjectFile& projectFile, String& error)
```
### Replication
1. Create a new solution with one project, titled "aeqw89.xml.csproj". (or anything that has .csproj at the end)
2. Unload solution (not necessary, but removes potential for IDE to be locking the project file)
3. Run in terminal 'publish overwrite local-packages'
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
If the project name ends with the string '.csproj' and subsequently is placed into a folder structure with '.csproj', and the project file's name ends with '.csproj.csproj', then the following error is produced.
Replication