VNEXT Unable to build - asp.net-mvc

So the issue is, during building my VNEXT Web app, i get following errors:
Error CS0518 Predefined type 'System.Int32' is not defined or imported OHL.Web.DNX Core 5.0
Error CS0518 Predefined type 'System.Object' is not defined or imported OHL.Web.DNX Core 5.0
plus 760 other errors (basic language level). It seems to have lost every relation to the dnx building foundation.
How do i fix this? i have tried switching dnvm to beta 5 and back to 4, nothing.
Thanks

Related

Can't compile Xamarin project, four errors when I compile

This is a mobile app written in Xamarin. Latest version of Xamarin. Won't compile the android project. iOS compiles fine. Installed latest 'everything'. Tried deleting obj/bin, packages and restoring.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Aapt2.targets(154,3): error APT2062: failed linking references.
/Users/userX/code/work/example-app/Example.Services.Client.Forms.Droid/obj/Debug/lp/1/jl/res/values/values.xml(0,0): Error APT2260: style attribute 'attr/cardBackgroundColor (aka Example.Services.Client.Forms.Droid:attr/cardBackgroundColor)' not found. (APT2260)
/Users/userX/code/work/example-app/Example.Services.Client.Forms.Droid/obj/Debug/lp/1/jl/res/values/values.xml(0,0): Error APT2260: style attribute 'attr/cardElevation (aka Example.Services.Client.Forms.Droid:attr/cardElevation)' not found. (APT2260) (Example.Services.Client.Forms.Droid)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Aapt2.targets(3,3): Error APT2260: resource style/CardView (aka Example.Services.Client.Forms.Droid:style/CardView) not found. (APT2260) (Example.Services.Client.Forms.Droid)

Autofac Build() throws exception on latest Xamarin iOS when Linker configured to Link All

After upgrading to Visual Studio 16.3.0 (Visual Studio for Mac 8.3.1805) Autofac throwns an exeception when doing builder.Build() in a project that previously worked:
The type 'Autofac.Features.Indexed.KeyedServiceIndex'2' does not
implement the interface 'Autofac.Features.Indexed.IIndex'2'
With this release of Visual Studio (and maybe earlier versions too), iOS is compiled using Mono 6.4.0.198 and I suspected that this might be what is introducing the braking change. Alternatively the linker behaves differently with the latest tool-chain. All I can say is that this used to work and now it doesn't.
Following these guidelines is not sufficient: Cross-Platform and Native Applications
To work around the issue, first make sure that Autofac is installed both in the iOS project, Android and the .NET Standard shared project, then choose one of these two options:
Set the linker to Don't link or Link Framework SDK's Only
Or, you can; add --linkskip=Autofac (case sensitive!) to the Additional mtouch arguments in iOS Build found in the iOS project properties.
Or, you can; create a Custom Linker Configuration file, which I btw think is the best option if you need linking. It's a little bit more work, but when using a Linker Description file the compiler will give you usable feedback when you build, if you've made a mistake like misspelling an assembly etc. Also, the Linker Description file has an identical format across Android and iOS.
Note: Option 2 and 3 will only increase your app size a small amount, as it will ensure that all of the Autofac assembly is included in your app package, while all other assemblies not specified as part of 2 or 3 will continue to be linked.
I assume that the needs for one of these work-arounds is an indication that Autofac is currently not linker safe.

How to compile a demo from "Introduction to 3D Game Programming with DirectX 11" in Visual Studio 2015 (or later version)?

I've been stuck with this for a few weeks and I just kept getting strange debug errors like:
1.a combination of 3 errors about DXGI_RGBA in dxgi1_2.h(now has temporary disappeared)
C4430,C2143 and C2061
like errors in this link
Errors about dxgi1_2
2.error C2677: binary '': no global operator found which takes type 'DirectX::XMVECTOR' (or there is not acceptable converstion)
This version of overload for operator is declared in DirectXMath.h, defined in DirectXMathVector.inl and works perfectly fine in other parts of this demo project.
3.Sometimes lots of errors just pop up when I open a file but they won't be considered as errors when building.
I wonder if there is something to do with the include order I take.
Is it possible to give me a clear guide for how to deploy demos from this book in vs2015? I would truely appreciate that. Thanks!
I solved this problem by including DirectXMath.h and adding
using namespace DirectX;
in the CPP file where I got that error.
All of the operators were moved into the DirectX namespace in the latest SDK

Using Late Bound Assemblies with Xamarin for iOS

I'm trying to port one of my iOS apps from the Mono versions of the
ServiceStack.Text libraries to the PCL versions for JSON
serialization/deserialization.
I have the libraries working in a regular Windows console application. When trying to port this into the iOS application, I'm getting an "Object reference not set to an instance of an object" exception from on the ServiceStack extension method classes. The error message is a red herring; the true error is getting swollowed by a try/catch.
The static constructor in ServiceStack.Text.PCL.PclExport is doing late binding for a
platform specific DLL and can't find that DLL. The build log bears out that the
Client, Interface, and Pcl libraries aren't being packaged with the .app file even though the reference are included at the project level.
I've been able to reproduce this in a basic iOS Hello World application. If I
add a line of code that references a method in the Pcl DLL, the three missing
libraries are copied. However, I'm still getting the same "Object reference not
set to an instance of an object" error.
I suspect that this is caused by the fact the Xamarin compiler doesn't translate the DLLs into iOS binaries unless they are actually used, and since they're late bound, it doesn't know they're used and so ignores them.
I didn't think late binding was legal under the licensing on at actual iPhone? doesn't the link merge everything into one exe?
See the Xamarin Linker Docs try the -nolinkaway option.

WCF client reference not generated correctly

From past few days I am facing error related to WCF service reference, my project was working fine but suddenly I am getting 100's of errors:
Error 2 Cannot implicitly convert type
'Trade_ERP.ConfigurationRef.MaterialGroup1[]' to
'System.Collections.Generic.ICollection' E:\Trade_ERP\Models\Configuration\MaterialManagement\MaterialGroup1Model.cs 13 20 Trade_ERP
Error 6 Cannot implicitly convert type
'Trade_ERP.ConfigurationRef.ValuationClass[]' to
'System.Collections.Generic.ICollection' E:\Trade_ERP\Models\Configuration\MaterialManagement\ValuationClassModel.cs 14 20 Trade_ERP
.
.
.
Everything was working fine but I don't know what happened / went wrong, so that this errors are coming.
And in our office, only on one PC it is working fine.
Check the references in the project where the service reference is added. It might be possible that on the working computer you will find less dll files referenced.
Maybe you have referenced a dll/project which contains classes as MaterialGroup1 and ValuationClass. If so, WCF will reuse those types when generating the proxy.
If this is the case, you will have to click on configure, then select "Reuse types in specified referenced assemblies" and check all the assemblies, except the one that contains those classes.
This way WCF will generate new classes even if there are other compatible types referenced in your application.

Resources