It seems like VS2017 15.4 Preview "Windows Application Packaging Project" tool failed to generate a working app but it's different:
I have a WAP project added to my WPF application.
The WAP is associated with the store. When I click create packages it says:
Error Your project.json doesn't list 'win10' as a targeted runtime. You should add '"win10": { }' inside your "runtimes" section in your project.json, and then re-run NuGet restore. WapProject C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets 307
But the WAP project has no projects.json by default...
When I click the solution and manage nuget packages, there is this consolidate option because an old class lib uses json.net 5.x (because of jObject etc.) and the wpf app has 10.x
The main wpf app does build and run fine. Creating the packages is the issue.
edit: double clicking the error takes me to:
<ResolveNuGetPackageAssets Condition="Exists('$(FrameworkInjectionLockFile)')"
NuGetPackagesDirectory="$(FrameworkInjectionPackagesDirectory)"
RuntimeIdentifier="$(NuGetRuntimeIdentifier)"
TargetMonikers="$(NuGetTargetMonikerToInject)"
ProjectLockFile="$(FrameworkInjectionLockFile)">
manual adding a project.json to the WAP project did not fix it:
{
"runtimes": {
"win10": {},
"win10-arm": {},
"win10-arm-aot": {},
"win10-x64": {},
"win10-x64-aot": {},
"win10-x86": {},
"win10-x86-aot": {}
}
}
edit2 consolidated the nuget packages. the wpf app builds, the class lib builds. the wap project does not:
Error APPX0501 Validation error. error 80080204: App manifest validation error: Line 24, Column 6, Reason: Windows.FullTrustApplication entry points are only valid for UWP desktop applications whose minVersion >= 10.0.14257.0. WapProject C:\Users\blabla\Source\Workspaces\WapProject\bin\x86\Debug\AppxManifest.xml 1
and here is line 24:
<Application Id="App" Executable="WapProject.exe" EntryPoint="Windows.FullTrustApplication">
edit3 went to the properties of the wapp and moved from anniversary update 14933 to the creator update and I can create the packages now. So it's solved. But how and why?
This was an issue in the preview drop of Update 4. Fixed in the official version 15.4.1 of Visual Studio 2017 Update 4.
Related
Microsoft announced the expiration of Basic Authentication in Exchange Online except STMP AUTH, but no guarantee on using it for long term. So, I decide to start the change with our Reports delivery in SSRS 2016 which mainly via SMTP email right now.
After reading many sources, I found that SSRS has Report Delivery Extension which we can build assembly to customize new Delivery Method, and from here I can send the Report Email through Microsoft Graph & Azure Identity.
Link of delivery extension
In the Project, I added Nuget Package of:
Microsoft Graph package version 4.47
Azure Identity version 1.8
the VS automatically add other dependencies to project and I can build the project successfully without any Warnings or Error
However, deploying the assembly to SSRS, after the subscription runs, I got the error in the log as following:
notification!WindowsService_0!59ac!11/18/2022-16:42:08:: i INFO: Notification 27e69a92-12b9-4ab8-984f-d5910af77de7 completed. Success: True, Status: Error: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.46.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I check carefully the dependency of other assembly in nuget website, but nothing indicates that I'm using wrong version. The Microsoft.Identity.Client.dll file is copied to Bin folder of ReportServer.
I tried to update the Microsoft.Identity.Client.dll file with version 4.46.0 in nuget (ignore the dependencies), but another assembly version mismatch comes up:
notification!WindowsService_0!4d94!11/17/2022-23:59:03:: i INFO: Notification b82bb214-3880-4f80-857b-cdf42cde8ff0 completed. Success: True, Status: Error: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
And now, I could not find the System.Diagnostics.DiagnosticSource.dll with version 4.0.4.
I can only find version 4.0.0 or 4.3 above.
Now I'm stuck here.
Does anyone have experience on this?
How can I bypass this dependency check?
I even try to downgrade version of Azure.Identity version to lower one, but still stop at the System.Diagnostics version 4.0.4
Then I create a Console Application which I just send a test email with all latest version of assembly Azure.Identity and Microsoft.Graph on the same server (same .Net Framework 4.7.2 and same firewall configuration). It can be sent sucessfully.
I'm in doubt that SSRS 2016 has any assembly confliction which point to lower version of those assemblies.
I have the exact same problem, but with building an add-on for Act! for Windows. My code works outside Act! in a standalone .NET 4.7.2 app, but I get the exact same conflict as described above when loaded within Act!. That said, Act! itself doesn't even use Microsoft.Identity.Client (that dll is not part of it)
I have existing app that uses MySQL Server. Some errors I was getting when trying to add a new feature led me to upgrading to 'MySql.Data.EntityFramework 8.0.11'.
error I am getting when on:
public CitiesContext() : base("name=CitiesContext"):
An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Under my properties, my target framework is still version 4.6.1.
Is there a 'how to document' somewhere on how to upgrade the EntityFrame work? I know several of the other installed packages were installed while targeting v 4.6.1, so lots of other types of errors using (like hay this was compiled with v 4.6) when trying to compile with a web.congf using
I have installed
PM> Install-Package EntityFramework -Version 6.4.4
Package 'EntityFramework.6.4.4' already exists in project 'Lat34North'
Time Elapsed: 00:00:00.0186347
Please note. This is a hobby for me, not a profession. The app is written using asp.net mvs an first issued in 2018. Do I just need to change the target in the properties and upgrade all the other packages??
Thank you for any help.
I'm building a Razor Page app using ASP.NET 2017. When I run the command
dotnet aspnet-codegenerator razorpage -m Activity -dc CongContext -udl -outDir Page\Activities --referenceScriptLibraries
This error appears:
Could not load file or assembly 'Microsoft.EntityFrameworkCore,
Version=2.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I stopped and restarted VS, I've also cleaned and build the solution. Attached jpg shows the code I typed and the results
This is because of different versions of packages. Check the 'Dependencies' node of your project. The Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.Design must have same 2.0.3 versions.
If not, delete and re-add them from [Tools] menu > [Nuget Package Manager]. Also delete the Migrations folder and repeat instructions as listed here. For more info, you may take a look at this comment
I'm getting the following error when trying to deploy an app with the Microsoft Band SDK. The build config is RELEASE and the target output is ARM. If use DEBUG config, it works.
Error : DEP6810 : MdilXapCompile.exe failed with error code 2001.
I've examined the MDILXapCompileLog and the following is the where the compilation failed:
CrossGen failed
Error processing assembly [projectpath]...\obj\ARM\Release\MSIL\Microsoft.Band.dll
Raw error code: 2148733978
NOTE: The extra weird part about this situation is that if I only package the app without deploying, I can side-load it to the device and it works as expected.
Here are the csproj sections - Debug/ARM:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
Release/ARM
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>false</Prefer32Bit>
The only difference I see are the debug symbols, could the Microsoft.Band.dll not have public symbols? Isn't Visual Studio supposed to created them?
I noticed that the solution still had the old Band SDK - Preview packages even after updating to the newer SDK. I manually deleted all the nuget items, forced a package refresh and the project now deploys successfully.
Here are the steps:
Close Visual Studio
Navigate to YourSolution/Packages/
Delete everything except packages.config
Reopen the solution in Visual Studio
Right click on solution and select "Manage Nuget Packages"
Click the "Restore" button that appears at the top of the dialog window
Rebuild the solution and it should deploy properly
I think I have a minor problem with my Gradle build files in Android Studio. Since I have no experience with them, and the few research results didn't resolve my problem, I think, that some of you guys maybe know how to resolve that issue.
At first I want to explain how I "constructed" my project in case you need this information. At first I created a fresh Android Studio project to get the project/directory structure. When the creation was finished, I closed Android Studio and checked them manually out of our SVN. The reason is not really important for my issue, but I did it to leave the project structure of my company the way it is(the Android part is just a small part of it). Instead I checked my Android Studio project in and linked all necessary files with SVN externals. So it is able to checkout and commit without changing anything in the project structure. Anyways, by creating a new project my Gradle files have been the default ones, after creating a new project. Since all necessary files have been checked out in the correct Android Studio project directories, I started Android Studio again, deleted the previously created project from the list, and imported it again. After that all my new files have been displayed. Even the new libraries are included in my Gradle build file under dependencies, as you will see.
But when I am trying to Build my project (I tried "Rebuild" and "Make project") I receive following Gradle error message:
FAILURE: Build failed with an exception.
What went wrong: A problem was found with the configuration of task ':app:checkDebugManifest'. File
'D:\Workspace\MyProject\app\src\main\AndroidManifest.xml'
specified for property 'manifest' does not exist.
This is my build.gradle in my projects root directory:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
and this is the build.gradle in my "app"-directory
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.0"
defaultConfig {
applicationId "de.giessen.advenco.key2operate"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}
If you guys need more information (settings.gradle, .properties-files, AndroidManifest.xml) just tell me.
I don't know if this is important but, this is what the Gradle Console shows, before the error occurs:
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest FAILED
Gradle is looking for the manifest at \src\main\AndroidManifest.xml, which is the default for new Gradle projects.
If you are using a different folder, you can specify a different location in your build.gradle using something like this:
android {
// ...
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}