Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Exception on Publish with Produce Single File option selected #80

Open
Taster-git opened this issue Oct 26, 2022 · 0 comments
Open

Comments

@Taster-git
Copy link

Taster-git commented Oct 26, 2022

Visual Studio: 2022
Target Framework: net6.0-windows10.0.19041.0
Target runtime: win-x64
Deployment mode: Framework-dependant

Runtime Exception at all Production machines on Publish with Produce Single File option selected but works fine when this option is unselected.

Publish is successful but Exception when application is run at Production machines.

Called method: (or any other )
VirtualDesktop.FromHwnd(hWnd)

It returns following Exception
`Exception:Empty path name is not legal. (Parameter 'path')

StackTrace: at System.IO.Strategies.FileStreamHelpers.ValidateArguments(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share)
at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare)
at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.<>c.b__14_2(Assembly x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source)
at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable1 items) at Microsoft.CodeAnalysis.Compilation.ValidateReferences[T](IEnumerable1 references)
at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.WithReferences(IEnumerable1 references) at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.Compile(IEnumerable1 sources)
at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.CreateAssembly()
at WindowsDesktop.Interop.ComInterfaceAssemblyBuilder.GetAssembly()
at WindowsDesktop.VirtualDesktop.InitializeCore()
at WindowsDesktop.VirtualDesktop.FromHwnd(IntPtr hWnd)
at MyProject.DB.DTOs.ActiveApplication.<>c__DisplayClass138_0.b__0() in D:/ProjectPath`

Any Help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant