Creating a Visual Studio console application for SharePoint is a good idea if you want to do a small POC (proof of concept). This saves good amount of time and the overhead of deployment and server reset. We will not focus on creating console application, but learn how to resolve/fix the most common error which developers face here - "FileNotFoundException was unhandled"Error - System.IO.FileNotFoundException was unhandled
This error occurs because Visual Studio console applications run on the 32 bit mode by default, but SharePoint (2010 and above) is built on the 64 bit mode.The error says - System.IO.FileNotFoundException was unhandled.
The error description says - The Web application at http://yoursharepointsite could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.How to fix ?
In order to fix the issue simply change the Build platform target to 64 bit (x64).
Step 1 - From the Solution Explorer, right-click on the project and click "Properties", click on "Build" and change the Platform target to x64 (64 bit). Save the changes.
Step 2 - Re-run your application and this time it will run as expected with any issues.
- Setup synonyms or alias or thesaurus in SharePoint
- How to redirect SharePoint Site Collection to different URL
- How to hide quick launch in SharePoint
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException
- SharePoint Server 2016 Preview installation error - This Product Key isn't a valid Microsoft Office 2016 Product Key. Check that you've entered it correctly.
- How to delete SharePoint List Item programmatically
- SharePoint Server 2016 IT Preview Deprecated Removed features
- Create SharePoint Site Collection using PowerShell New-SPSite
- How to create SharePoint List Item programmatically
- See actual SharePoint error exception modify web.config
- SharePoint Server 2016 installation System Hardware requirements
- [Solved] SharePoint Illegal operation attempted on a registry key that has been marked for deletion
- SharePoint Designer Workflow error - Coercion Failed: Input cannot be null for this coercion
- [Solved] SharePoint Access Denied error editing Document Name
- SharePoint 2016 error - Could not find file ManageUserProfileServiceApplicationTenantSimplified.xml
- Bypass domain name for IIS site (SharePoint)
- SharePoint PowerShell Merge-SPLogFile filter by time using StartTime EndTime
- Recover SharePoint if the SQL Server IP changes
- SharePoint CAML query error - The XML source is not correct
- How to enable disable SharePoint Developer Dashboard for tracing troubleshooting
- Change SharePoint search results FullTextSqlQuery RowLimit 10000
- Update Created By (Author) column of SharePoint document using PowerShell
- SharePoint Server 2016 error - Failed to connect to the configuration database
- The service instance
- SharePoint Managed Metadata Hidden Taxonomy List - TaxonomyHiddenList
- The declared package does not match the expected package Eclipse - Android
- JSON Tutorial: List of Lessons - Json-Tutorial
- Android : No Launcher activity found! Error - Android
- Set Title to Android AlertDialog - Android
- Android AlertDialog with Yes No and Cancel Button - Android
- New-SPLogFile PowerShell - create new SharePoint log file - SharePoint
- Get HTML table td, tr or th inner content value with id or name attribute - Html
- Center Align TextView Android Horizontally or Vertically - Android
- NOTE: This project contains resource errors, so aapt did not succeed, which can cause rendering failures. Fix resource problems first. - Android
- Android Disable back button programatically - Android
- How to make a dummy phone call from Android Emulator device - Android
- How to extract deployed WSP solution from SharePoint FARM using PowerShell - SharePoint
- Kill or force quit stuck application or process in Mac OS X - Mac-OS-X
- Deploy SharePoint wsp solution package using PowerShell - SharePoint
- Calculate Volume of Sphere - C-Program