Missing SharePointContext.cs and TokenHelper.cs files in the SharePoint project solution - nuget-package

Missing SharePointContext.cs and TokenHelper.cs files in the SharePoint project solution even after adding the SharePointOnlinePnPCore nuGet package? So how to get those files in the SharePoint solution?

Sometimes it does happens so try adding another nuGet package in the SharePoint project solution by searching AppForSharePointWebToolkit package and install it. This solution worked for me, hope it works for you guys as well!

Related

Azure Web Deploy "Could not find a part of the path 'D:\home\site\wwwroot\bin\roslyn\csc.exe'."

I've been browsing the web for a couple hours now looking for an answer to my problem. I am trying to deploy a Web API on Azure Web App Service using VS2017. Everything builds and works fine when running locally but once deployed on Azure (through VS2017) I get this error:
D:\home\site\wwwroot\bin\roslyn\csc.exe
My project is an ASP.NET Web Application (Using Azure Web API template) .NET Framework 4.6.1. I use Microsoft.CodeDom.Providers.DotNetCompilerPlatform Version=1.0.6.0
I also made sure that csc.exe is located in:
Visual Studio 2017\Projects\DeviceManagementAPI\DeviceManagementAPI\bin\roslyn
Just had the same problem and it seems it's a known issue with Microsoft.CodeDom.Providers.DotNetCompilerPlatform 1.0.6 and 1.0.7.
Downgrading to 1.0.5 solves the problem.
Upgrading Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 1.08 worked for me
After a while I simply uploaded manually the roslyn file directly into the server through Kudu. It seems to solve the problem but I still don't know why it won't upload automatically.
Same issue might be caused by missing or incorrect relative packages path. If you're changing solution folder structure make sure all imports have proper path's to avoid missing Roslyn files.
Generally suggest to replace auto-generated ../../../packages/... rabit hole with parameter which will point to correct Nuget folder.
<Import Project="$(NugetPackagesPath)\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('$(NugetPackagesPath)\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />

Resolve missing references using Nuget failed

I checked out a project form Team Foundation. As you can see in the picture, I used nuget to restore the missing packages. However, the reference problems are not resolved at all.
When I right click on my solution and choose Manage Nuget Packet for Solution, here is what I've got
I thought it means that I have download all the package but they are not added to my project because there are still many build errors. If I use Package Manager Console to download each package separately, the version will conflict with the original. I would like to see if there are any automatic way to resolve this problem.
Thanks in advance
Remember to check out the package folder outside the project folder.

Setting up Umbraco project with nuget in vs 2012 error

I'm trying to set up a development project in vs 2012 with nuget and Umbraco. I am aware of the several recipe's, amongst the better Umbraco for beginners: Setup Umbraco on localhost together with VS 2012 and uSiteBuilder.
When I am using this procedure I install Umbraco with nuget and build it without problems, but when I hit F5 I get the same error continously: "Could not load type Umbraco.Web.UmbracoApplication" which global.asax inherits from!
What is wrong, what am I missing here...? Thanks in advance /Finn
A bit late, but I had the same problem and the reason for that are missing dll's. Referenced libraries weren't copied to bin folder.
It is not the best or easiest way of setting the project up.
Instead of creating a WebForm project, create an empty MVC4 project and then install the Umbraco CMS from NuGet. This way you won't have to remove anything. It will also by default use IIS Express, so there is no need to change the project properties.
You don't even have to use the NuGet console. You can use the package manager and just search for Umbraco.
Well it seems like an unprofessional oversight from my point! I just forgot to give security access to the relevant folders to network service.
You might have to build and clean the solution a couple of times if you get exposed to the YSOD error: "Cannot create/shadow copy 'filename' when that file already exists" when you hit F5! This error might occur if you hit F5 too quickly after a build, in this case asp.net is probably not finished with whatever it has to complete, and the file is locked.
#Digbyswift: I do not agree with you! Whether you set up your project as an MVC or Webforms application, it doesn't matter. What is important though, is that you use empty applications, as if you don't there will probably be some references/dependencies that you have to delete in order to get the application running! And default server will be the vs dev server, which in my opinion is by far the best and easiest to use untill you are ready to deploy your application. I agree thouhg that using the package-manager from visual studio is the easiest way to come around installing Umbraco.
Following these steps and hints you should use no more than a couple of minutes from installing Umbraco untill you have the wellcome screen and is ready to set up db etc...
Cheers Finn...

Upgrading WSP using Powershell

I've run the Update-SPSolution command which I am guessing has worked as I have no errors returned. However, my extra feature in the WSP file doesn't show in the site collection features.
I've never really upgraded a solution I've always done the long winded retract it all and then reinstall. This is possibly down to my lack of understanding and I have been told upgrading can be sketchy by several people I have worked with.
How come the extra feature hasn't shown up in my collection features?
Does the upgrade solution only replace the WSP file and then you need to run the install command again?
If anyone could point out some decent articles on this it would be hugely appreciated.
I have managed to get the feature installed by re running the install solution powershell command and it seems to have worked!
However is this best practice? I can't see any detrimental affect of doing it this way currently!
You would need to run the Install-SPFeature command after the Update-Solution to install the newly added feature. http://technet.microsoft.com/en-us/library/ff607825
From my experience I use Update-SPSolution only when I need to deploy an updated dll for the whole existing solution (wsp).
If you updated other files or added a new feature then these changes will not be available, as update doesn’t instantiate manifest file to make your new feature available.
To "really" update solution you need to write an "UpgradeActions" as described here.
http://msdn.microsoft.com/en-us/library/ee535723.aspx

Preventing removal of a shared dll during a wsp solution uninstallation/retraction

I'm working on a bunch of solutions which uses a third party DLL from vendors like Telerik. We use the dll in most of your solutions. But when i uninstall any of the solutions the dll is getting removed from the assembly. This is a very unfortunate behavior.
I guess even putting the dll in the bin folder wont help it. Because i can use multiple solutions in a same web application. In that case if i remove on solution it is removing the dll from bin folder too.
What is the workaround for this ugly issue?
This is indeed painful. You could consider merging 3rd party DLLs in using ilmerge. Additional approaches can be found in Muhimbi's free SharePoint Coding Guidelines (Chapters 8 and 9)
One option is not to include the third party DLLs in your individual solutions. Anything that gets installed with a solution will be removed when you uninstall that solution. You can have a 'framework' solution that installs common DLLs. This way, those common DLLs are only removed if you remove your framework solution. Or you could have a single solution installer for each shared DLL if you want more fine-grained control over them.
See also the question on SharePoint.SE: Multiple solutions using shared dlls can cause havoc when individual solutions are retracted

Resources