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.
- Get-ADUser PowerShell - Get AD user details using email address
- SharePoint error cannot connect to the configuration database
- SharePoint - Use Today's Date Time in list view filter and calculated column
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- How to configure PDF iFilter for SharePoint
- Deploy SharePoint wsp solution package using PowerShell
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- How to enable missing SharePoint Site Assets, Site Pages library App
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- Send Email with attachment using SharePoint PowerShell, SMTP server
- How to recover SharePoint FARM if the SQL Server IP changes
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- SharePoint list excel import error - Title is a required filed and can't be empty
- Show Hide SharePoint column in List Library form with the conditional formula
- How to create classic site in SharePoint Online
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException
- Trigger Flow on selected Listitem from SharePoint view - create button with JSON column formatting
- SharePoint Server 2016 error Microsoft Office Online Server 2016 cant be installed on the same machine as a Microsoft SharePoint Server product
- How to get SharePoint List Item URL using PowerShell
- Sign in as different user missing in SharePoint 2013, how to enable
- Fix error The tool was unable to install the Web Server (IIS) Role during SharePoint 2019 Setup
- How to redirect SharePoint Site Collection to different URL
- SharePoint Server 2016 setup error - A system restart from a previous installation or update is pending. Restart your computer and run setup to continue.
- See actual SharePoint error exception modify web.config
- SharePoint PowerShell Merge-SPLogFile filter by time using StartTime EndTime
- How to integrate Salesforce CRM Sales and Service with Microsoft Teams - Teams
- MySQL 1005 Error : SQLSTATE: HY000 (ER_CANT_CREATE_TABLE) Message: Can't create table '%s' (errno: 150) - MySQL
- How to change Android Button Color using xml attribute and programatically using java - Android
- Java location in Mac OS X - Mac-OS-X
- How to get SharePoint List Item URL using PowerShell - SharePoint
- SharePoint installation error - Setup is unable to proceed due to the following error This product requires Microsoft .Net Framework 4.5 - SharePoint
- [Eclipse] Locate Preferences in macOS - MacOS
- Android Studio emulator/Device logCat logs not displayed - Android-Studio
- How to Change Text Size for Android ActionBar - Android
- Find the location of Spotlight searched file - Mac-OS-X
- Enable Dark Mode in Google Search - Google
- Graph API error when querying BookingBusinesses - ErrorExceededFindCountLimit, The GetBookingMailboxes request returned too many results - Microsoft
- [Fix] Restricted View permission level missing in SharePoint Online site library - SharePoint
- 🎃 Trending, Popular Halloween hashtags for year 2020 🎃 [Facebook, Twitter, Instagram, Snapchat] - Hashtags
- How to See Hidden Folders and Files on macOS - Mac-OS-X
- Vertical align two div's in Bootstrap [HTML CSS] - Bootstrap
- [Tutorial] Write And Run Python Code In Notepad++ Editor - NotepadPlusPlus
- Android Disable back button programatically - Android