I installed the starter kit version 05.06.01 on visual studio 2010 and when I create a compiled module, the first line of the manifest file is:
<dotnetnuke version="3.0" type="Module">
Shouldn't it be version 5.0
Thanks.
Starter Kit's manifest uses the older "Module" manifest type, for which the current version is 3.0. This is not related to the DotNetNuke major version, or the version of the module described in the manifest. Module manifest type is used only to package modules, and it is compatible with DNN4 and DNN5.
In DNN5 it is better to use the manifest type "Package", version 5.0. More specifically, "Package" is the manifest type used by the new extension installer. "Package" type can be used to install all extensions: modules, skins, authentication providers, and so on. Package manifest type is not compatible with DNN4, with one exception, authentication providers (since 4.6.2).
Starter Kit has not been updated to the new package system yet, but you can try Christoc's DotNetNuke Module Development Template to get DNN5 manifests.
Related
I have a server running tons of apps like IIS, VS, VS Code etc. Can someone tell me what these folders are:
%programfiles%\dotnet\shared\Microsoft.NETCore.App\
Microsoft.AspNetCore.App
Microsoft.WindowsDesktop.App
I have an old version of .NET Core but .NET Core uninstall tool cannot find it, it doesn't even show up in add or remove program.
Can I download the latest binaries of the SDK and just swap the directories?
shared/Microsoft.NETCore.App/<runtime version> This framework contains the .NET runtime and supporting managed libraries.
shared/Microsoft.AspNetCore.{App,All}/<aspnetcore version> contains the ASP.NET Core libraries. The libraries under Microsoft.AspNetCore.App are developed and supported as part of the .NET project. The libraries under Microsoft.AspNetCore.All are a superset that also contains third-party libraries.
Microsoft.WindowsDesktop.App.Ref describes the API of x.y version of Windows Desktop applications. These files are used when compiling for that target. This isn't provided on non-Windows platforms.
For more packaging details ,you can refer to this document.
If you can't uninstall the old version of .net core, you can download the version you want and specify to use this version in your project. You can take a look at this case.
I am building a netstandard2.0, with a series of sub-dependencies, including Azure.Data.Tables. I have found that Azure.Data.Tables on >=12.3.0 is not compatible with 2.2 projects, but version 12.0.0 is (or at least it doesn't crash my .Net Core 2.2 application).
Based on these premises the resolution was simple: put version 12.0.0 in the netstandard library dependencies. There's only one problem, that when I install this library using Visual Studio into my Net Core 2.2 project I get that visual studio decides to install 12.3.0.
I have checked documentation around enforcing certain versions using the allowed wildcards(https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges-and-wildcards), such as:
<PackageReference Include="Azure.Data.Tables" Version="[12.0.0]" />
Which produces this package description just before pressing "install".
But it doens't seem to work, Visual Studio simply carries on with the 12.3.0 installation.
It turns out Visual Studio was just using the nuget cache for my locally generated packages. If I either changed the version of the packaged package then the sub-dependencies would change. As well, another way of getting the precise package would be to clear nuget's cache locally: nuget locals all -clear.
I am having a weird situation where I cannot publish my final Web project. Here is the project structure:
Foo.Services.Common: this is shared library: .NET Standard 2.0.3, Microsoft.AspNetCore.Mvc.Core 2.1.0 with the class DefaultWebSettings defined.
Foo.Services.Common.Razor: Razor Class Library, has reference back to Foo.Services.Common and uses DefaultWebSettings: NETStandard.Library 2.0.3, Microsoft.AspNetCore.Mvc 2.1.0 and some other ASP.NET Core related package (static files, Configuration)
Foo.Services.Api: ASP.NET Core API only (no View, no Razor), has reference back to Foo.Services.Common. Publish well. Uses: Microsoft.AspNetCore.App 2.1.0, Microsoft.NETCore.App 2.1.0.
Foo.Services.Web: front end project. This one is the one I cannot publish! This one has references to both Common projects. Uses: Microsoft.AspNetCore.App 2.1.0, Microsoft.NETCore.App 2.1.0
However, upon publish, this one shows up:
The type or namespace name 'DefaultWebSettings' could not be found
(are you missing a using directive or an assembly reference?)
The error location is in a file of Foo.Services.Common.Razor project, NOT the Web project.
Funnily, Visual Studio perfectly works even with IntelliSense and Go to Definition:
I can build in both Debug/Release mode, run with/without debug any project in the solution well. Moreover, publishing Foo.Services.Common.Razor works without any problem!
In short: I cannot publish my Web project and have no idea what is the problem. I have tried:
Clean/Build.
Delete/Re-add references.
Manually delete all obj and bin folders.
Please show me what I may missing.
In the end, I had to remove Reference of the Common from Common.Razor and Web projects. I guess they could not build because of some conflict between .NET Standard and .NET Core. Had to copy all code of Common into Common.Razor.
Using NuGet Package Manager, I get this error message:
Could not install package 'Microsoft.Toolkit.Uwp.UI.Controls 3.0.0'.
You are trying to install this package into a project that targets 'native,Version=v0.0',
but the package does not contain any assembly references or content files that are compatible with that framework.
For more information, contact the package author. 0
The app is a Blank App (C++/winRT). Visual Studio 15.8.0 Preview 4.0.(10.0.17134.0, 10.0.17704.0)
Despite it's name, the Windows Community Toolkit is only intended for C# developers.
Create new Windows 8 application App1
Add ClassLibrary1 Windows 8 class library project to solution
Add PortableClassLibrary1 portable class library targeting Windows 8 and Windows Phone 7.5 to a solution
Reference HttpClient nuget package in ClassLibrary1
Reference HttpClient nuget package in PortableClassLibrary1
Reference both ClassLibrary1 and PortableClassLibrary1
Compile solution
You get an error at .appx package stage
Payload contains two or more files with the same destination path 'System.Net.Http.Primitives.dll'.
Source files:
\Projects\App1\PortableClassLibrary1\bin\Debug\System.Net.Http.Primitives.dll
\Projects\App1\packages\Microsoft.Net.Http.2.2.13\lib\win8\System.Net.Http.Primitives.dll
Please note the same error is reproduced if you reference any nuget package featuring both win8 and portable blends of assemblies.
What is expected:
Most specific version of a library (win8 one) is packaged into .appx and portable version is ignored
Any ideas on how to cheat appx packager and build this kind of Windows 8 projects?
It looks like the solution described here works: http://cyanbyfuchsia.wordpress.com/2013/05/03/payload-contains-two-or-more-files-with-the-same-destination-path/
Basically, you must set "Copy local" to false in the WinRT project that is referenced from the main app.
In addition to this, you should be getting warnings similar to:
All projects referencing ClassLibrary1.csproj must install nuget
package Microsoft.Bcl.Build. For more information, see
http://go.microsoft.com/fwlink/?LinkID=317569.
This is indicating a problem. Basically, the short of it, you should be installing HttpClient.Compression into all projects. MSBuild/AppX packaging doesn't know which binary to deploy between the portable library and store library project (they have different APIs & versions). Installing the package into the application, tells it.
I had such issue too. It was because I shared one of my solution between projects. I had to rename the solution, because the name was all the same like one of the projects. After renaming I had this problem.
I fixed it by: right click on solution I renamed and used both projects, then properties, then use same name in the assembly name like solution name.