Not able to find Windows.IdentityModel for windows 10 store app development - active-directory

Is this dll not compatible with windows store app, Or is there any other way to achieve the same.
I tried adding it from nuget package also but not happening, I am getting this error:
"Severity Code Description Project File Line Suppression State
Error Package restore failed. Rolling back package changes for 'Solution'."

As far as I'm concerned, you need to intall the Windows Identity Foundation as well as the WIF SDK and then restart the application for the effect to work.
For Windows 10 device, Windows Identity foundation is not an istall but a Windows feature need to be enabled.
Enter Control Panel from Start menu
Click program and features
Choose turn Windows feature on or off
Choose Winodws Identity Framework, click OK
Restart your machine
A similar question here that could be helpful to you. As Moory said in the comment, he fixed this issue by adding the reference below to the csproj file:: ( .
Please also try it. Thank you.

Related

Program requires .net5 SDK, why?

A few days ago I updated a wpf program from .net4.8 to .net5. Some users now get an error message that can be seen in the picture.
These users have .NET Desktop Runtime 5.0.x installed. Apparently that is not enough. The program will not work until the SDK is installed.
My question now is, is there any way I can quickly tell whether I'm using classes or methods that need an SDK?
Do I have to adjust the publish config?
I would not like to deliver the whole framework with the program together.
Appearantly your app has a dependency on the ASP.NET runtime as well.
You will either have to download and install this one separately or remove any references to it from your app.
Check for any framework reference to Microsoft.AspNetCore.App in your project files (Project Sdk="Microsoft.NET.Sdk.Web">) or under Dependencies->Frameworks in Visual Studio.

What is the best way to display report without installing anything on client

I'm a newbie developer who develop a software for a company, although I am quite familiar with programming I rarely develop a software for a company, now after I join a company I started to get a problem creating a software.
I must develop a software that can be installed and updated on client computer easily, I solve this by using clickonce, then the problem arise, nearly all software I develop must have report viewer, I try using reportviewer from microsoft, but this give me more problem when installing, I try everything I found on the web to make a setup that easy to install, but I keep struggle when installing reportviewer, it keeps error on some computer although sometimes it install without error on other computer.
I need a suggestion how I can develope a program that can display a report and print it without install any other program on the client. I use C# on Visual Studio 2015, I develop WPF, and web using it.
Use nuget in your project and add the following dependencies to it
Microsoft.ReportViewer.2015.Runtime
Microsoft.ReportViewer.VS2015.WinForms
Launch your report viewer like this:
var dlg = new ReportPreviewDialog();
dlg.ReportViewer.LocalReport.DisplayName = "My report";
dlg.ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("datasource1", data));
dlg.ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("datasource2", data2));
dlg.ReportViewer.LocalReport.ReportEmbeddedResource = "YourClient.TheReport.rdlc";
dlg.ShowDialog();
TheReport.rdlc is your report as resource in your project (=> Build Action: Embedded Resource). Make sure the namespace is correct or your report won't be found.
Works with WPF.
Try to visit this Deploying Reports and ReportViewer Controls.
If the first option doesn't works you can try this step.
Go to your project properties or press (Alt + Enter).
Click the Publish tab.
On the Install Mode and Settings click Application Files button.
Find all Microsoft.ReportViewer dlls and select the Publish status to Include/Include (Auto).
Click OK.
Here is some image:
Application Files Form

Publish Windows form application how change the installation path

I have built one windows forms application and I published for client installation. While installing the setup file, it should ask the user to select the installation directory path; instead, it's installing in default path as below :
C:\Users\Mysys_t\AppData\Local\Apps\2.0\434YBBVC.Z2H\TNYPR09N.1JZ
Is there any settings to do this, so that, while installing, user is able to select the installation directory?
In general, the answer is no. See a related MSDN forums discussion among other online references that explains why: ClickOnce was designed to automatically manage installation directories to prevent deployment collisions.
Now...the referenced MSDN forums discussion also links to one way to possibly work around this. Certainly anything is possible with some ingenuity and work (e.g. publishing a setup wrapper with ClickOnce to leverage ClickOnce's auto updates but use indirection to control where your actual app ultimately gets installed); but this is not possible using ClickOnce "straightforwardly".
this can be achieved by
Creating an MSI Package for C# Windows Application Using a Visual Studio Setup Project
pls follow the link below :
http://www.c-sharpcorner.com/UploadFile/1492b1/creating-an-msi-package-for-C-Sharp-windows-application-using-a-v/

Desktop shortcut shows some configuration wizard on double click

I made a setup project for my windows forms application and then installed it. It properly created a shortcut on desktop. Now when I double click it to open, it shows a progress bar like thing saying Configuring application. After that, my windows form appears and runs normally.
I have no clue why this is happening. My earlier version for the same application was running properly with o. Also if I install the previous version, it starts normally without any problems. Only the setup files that I am creating now are showing this problem.
Any one having any clue...
You created a ClickOnce installation. You probably wanted to create a standard Setup Project. IIRC, there was some issue with this type of project in Visual Studio 2010, as in the project type is being depreciated, but I can't seem to find anything about that now.
Other alternatives are using WiX or the limited edition of InstallShield.
Oddly enough, the ClickOnce installer is pretty good, assuming you have the infrastructure to support it (a spot on the web where you place updates) and don't mind the nonstandard behavior (that weird dialog on start). Frankly, installer technologies right now in the .NET world suck. They're all extremely complicated and fail to insulate the developer from the intricacies of how installers work with Windows.
To turn off ClickOnce, IIRC, do the following:
Uncheck "Sign the ClickOnce manifests" on the Signing tab
Uncheck "Enable ClickOnce security settings" from the security tab
remove any references to "System.Deployment" from your projects

Debugging silverlight application problem

My VS2010 doesn't stop at breakpoints inside of silverlight application. It appears that no symbols for it have been loaded during debugging. When I hover over the break point it says "The braekpoint will not currently be hit, no symbols have been loaded".
I have tried all of possible solutions offered by google and have no success. The problem occurs even when I create brand new silverlight app hosted by an ASP .NET web project. All of my project configuration looks fine - silverlight debugging is enabled in the Web project.
I am using silverlight 4.
here a link to the sample project created out from the tepmlate.
Any thoughts ?
P.S I just tried to reinstall VS2010 and the problem still exists.
EDIT: I just tested the same project on another machine and it stops at the break point it seams that the problem is somewhere in the configuration of VS or silverlight.
with Matt Dotson's help I managed to attach the debugger manually. However this solution is not good enough for daily use.
Depending on my experience in Silverlight following these steps keep your project debug-gable.
Condition 1>
Firstly we need to be ensure that in Web Project's properties there is a Web section, as you see below Silverlight checkbox must be checked.
Condition 2>
Follow In Menu Debug => Attach Debugger>
Visual Studio sometimes can't attach debugging platform you need to lead the way :) . By this way you may debug other platforms,(also you may debug your product platform but pdb files must be sync and don't forget you may suspend your product platform using this).
Condition 3> Your default web browser may be Firefox,Chrome or other than IE.By Visual Studio default try to attach to IE. But when you run VS calls default browser,so you need to have a manual attachment in Condition 2 or set your default browser by right clicking on default page > Browse with .
Condition 4> There is xap file generally located in web project\ClientBin directory. Sometimes after build operations this file can't be replaced and your ProjectDll and your Project PDB files not be sync. This cause wrong line match while debugging or can't find a debugging file attached caution. I strongly suggest delete all generated files in Bus project and delete Clientbin\ProjectName.xap file. After rebuild all it must be ok!
Hope helps.
What broswer are you using? You need to be using Internet Explorer to debug silverlight projects.
I have had a similar frustrating experience with this but in my case the solution was very simple. It seems that somehow, and I really have no idea how, the debugger option for Silverlight had become unchecked in the properties on the hosting ASP.NET project.
I just assumed that as I had been previously debugging, this option was set and I didn't bother to make sure that this was this case. Just goes to show that one should always check the basics first; if I had done that it would have saved me some time.
To check this in VS2010, right-click on the project and select properties, change to the Web tab and check the Silverlight option at the bottom of the page, in the debuggers section.
Also see the debugger to a silverlight process
http://msdn.microsoft.com/en-us/library/cc838267(VS.95).aspx
If that doesn't work, then
reset iis (if you are debugging in that)
delete temporary asp.net files (%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET Files)
clean and rebuild your solution
The resolution came after 2 days of headbanging. It appears that the link which Malcolm gave covers exactly my problem but my I was narrow-minded enough not to pay it enough attention because when I run the debugger as long with the app my default browser was FF. So I thought that after the FF starts I can load the page from IE or Chrome.
Actually the problem is that the debugger cannot be attached to the silverlight project because of the FF. And when I load the app from IE or Chrome the debugger dis still not attached.
Thanks to everyone that tried to help.
if you have multiple project, Rebuild the project separately that you want break point. Its work for me
Try also picking internet explorer from browser list menu as your browser

Resources