We did a custom DEBUG build for cef version 84.1.1 to add codec support, and I am able to add a debug point to the libcef code (e.g. to file \cef\libcef_dll\libcef_dll2.cc) and attach the visual studio debugger to the sample cefclient.exe.
We have a .Net application, which uses CefSharp nuget 84.1.1, we just replace the cef dlls with the dlls that we built. When I run my host app, and I add a breakpoint, I keep getting the message that no matching assemblies were loaded. I tried attaching to all browsersubprocess instances, and I tried attaching to my app host process with no result.
Related
Converted an old .NET Framework project to .NET Core 3.1 yesterday. The application runs fine on my own machine and debugs correctly.
I have put both the following into my .vbproj/.csproj
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>win81-x64</RuntimeIdentifier>
However when I move the .EXE to a remote machine and attempt to run said EXE on that remote machine I get told that the DLL (for the project in question) does not exists.
I moved the .dll to the same directory that the exe is in (not ideal) and get the following error instead
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Program Files\dotnet'.
I used to use Costura.Fody to create a single file exe without any issues in .NET Framework, I was under the impression the above would do the same for the .NET Core packages.
Can someone point me in the right direction please.
For anyone else that may find this question and find it useless.
I was 'Building' the project instead of 'Publishing' the project, this in-turn wasn't creating the self-contained exe properly.
Don't be a donut like me.
In Visual Studio 2019, go to Build > Publish MyApp. This will open a tab in the editor area. Click on Show all settings to open the Profile settings dialog. Then click on File publish options and check Produce single file.
When i deploy the application from Visual Studio to Azure app service using Framework/Runtime dependent mode, then app service run properly.
But when application is deployed using CICD (using VSTS), then app service fails with above mentioned error in title and following error is logged in stdout log files :
Error:
An assembly specified in the application dependencies manifest (App.deps.json) was not found:
package: 'System.Diagnostics.PerformanceCounter', version: '4.5.0'
path: 'runtimes/win/lib/netcoreapp2.0/System.Diagnostics.PerformanceCounter.dll'
But the dll is present in mentioned path under .netcoreapp2.0.
I am publishing the application using VSTS agent.
If i restart the app service then it works fine.
This is one of those errors that can come up for a thousand unrelated reasons. -Everytime- I get this error it's because I've upgraded Nuget packages in my project and one of those packages uses a version of the .Net Core SDK I haven't installed locally. I suspect since you're using the Framework dependent mode it could be an issue if it sandboxes you away from other SDK's (not sure if it does, just thinking out loud).
Make sure your .Net Core SDK's are up to date.
Try publishing it and sending the whole framework with it if you're using .Net Core as the backend (and not the old framework).
Check your NuGet's and make sure they're all supported on the framework you're specifying. I've seen cases where a 4.5 framework assembly 'might' work locally but then error out on the server. If one of them targets an SDK that isn't on the server you'll get this.
https://www.blakepell.com/asp-net-core-http-error-502-5-ancm-out-of-process-startup-failure
Since it works fine when you restart the app service, you could add a Azure App Service manage task to restart Azure App Service in your pipeline:
steps:
- task: AzureAppServiceManage#0
displayName: 'Restart Azure App Service'
inputs:
azureSubscription: azureSubscriptionName
Action: 'Restart Azure App Service'
WebAppName: AppServiceName
It seems that the first time you try to run, your application can not find this .dll that is required on the server. What you can do is to add this in your .csproj file:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Adding the above snippet will export all DLLs needed to run the application (assuming SDK is not available, and runtime is quite lightweight to contain non essential libraries).
I am using visual studio 2017, created a new xamarin forms project and tried to run the UWP project. It shows the following error:
the project needs to be deployed before it can be started. verify the project is selected to be deployed the solution configuration manager, or deploy it explicitly by clinking one of the deploy commands in the build menu.
I have looked at all online solutions and only found that you need to set the cpu to x86 and to check the deploy checkbox under the configuration manager under the solution. Both these options don't work. I still get the same error. I have also tried every cpu option including ARM.
Have you tried to uninstall the existing UWP app from the Windows Start menu > All apps? Then deploy again from VS. It did the trick for me.
Sometimes when I create an app packet for win store; Visual studio seem to get hung up building to the packet (project needs to be deployed before it can be started -error).
I solve it by creating a new app packet.
I have an application that loads user controls into .NET web application. When I compile and test the application locally on my dev machine it works on my machine. The project builds successfully using MSBuild on our build server. However when I deploy the dll generated by MSBuild on the build server I get the following error when the application loads the control:
BC30456: 'CreateResourceBasedLiteralControl' is not a member of 'ASP.usercontrols_somecontrol_ascx'.
I took a look and compared the dll generated on my machine and compared it(looked at the file size) with the one created by the build server and noticed
a difference in the file size. This is confusing considering the code being built locally and on the build server is IDENTICAL. I manually compared each file by hand. So my question is: What is causing this error? What would be different between MSBuild's compilation of the code and what is going on in Visual Studio when compiling the code?
You've got a versioning issue. Some assemblies are different on your target machine than on your dev machine. I'm afraid you're going to have to do some digging to hunt it down, since this error message is entirely unhelpful. Really it's pointing you in the wrong direction since the problem isn't in your assembly. It's probably caused by something in your project References. Have you got some 3rd party tool or SDK on your dev machine that hasn't been updated on the server yet?
The last time I saw this was when I had built a DotNetNuke module that was built against a newer DotNetNuke.dll assembly than my server had.
If you compile that as dll.
Try delete App_Code.dll in bin folder.
I am facing a strange issue. I have created 5 projects in a solution which are of type Windows Class Library, Windows Console Application, Windows WPF Application, Workflow Activity Library and Sequential Workflow Console Application. I have added reference of same dll in all five projects. Without writing any code I build the projects.
Three of them Windows Class Library, Windows Console Application and Windows WPF Application build successfuly while two Workflow Activity Library and Sequential Workflow Console Application projects gives this error.
XC1020: Build error occurred in the XAML MSBuild task: 'Could not load file or assembly 'assembly name' or one of its dependencies. The specified module could not be found.'
The DLL i am referring to has runtime version 2.0 and setting specific version = true doesn't change anything.
So is this issue in Vs beta version or something is wrong with DLL?