Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8616525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:38:29+00:00 2026-06-12T05:38:29+00:00

I try to generate LINQ classes for my Site Collection root in Sharepoint with

  • 0

I try to generate LINQ classes for my Site Collection root in Sharepoint with this command (all in one line):

SPMetal.exe
/web:http://myserver 
/namespace:mynamespace 
/code:myfile.cs 
/parameters:mysettings.xml

The mysettings.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Web AccessModifier="Internal"
 xmlns="http://schemas.microsoft.com/SharePoint/2009/spmetal">
    <List Name="List1"/>
    <List Name="List2"/>
    <ExcludeOtherLists/>
</Web>

But it doesn’t work, the resulting error is (roughly translated from German):

The specified file name can not be used. Perhaps already a file or
directory with this name exists, or permissions are not sufficient
to access the file.

And I think it can’t be a file problem because:

  1. If I change the web URL to http://myserver/subsite it works pretty good, the file gets generated
  2. I can see the file being created with 0kb and after 1-2 seconds the file gets deleted and the error message is shown
  3. I have more than enough space and permissions are ok as well (see 1.)

So what am I missing? Or can’t I create LINQ classes for the root Site Collection?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:38:30+00:00Added an answer on June 12, 2026 at 5:38 am

    If you are using Visual Studio 2010 try LINQ to SharePoint extension. It allows to use nice UI wizard for generating models classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to generate title in all levels of the officers but I get
In my program I generate classes dynamically but when I try: String[] args =
Using linq to sql I would like to generate some sealed classes in a
I try to generate a csv file through a lot of functions like that
I try to debug a javascript function called from Generate Thumbnails plugin in Wordpress.
How to generate a KeyboardInterrupt in Windows? while True: try: print 'running' except KeyboardInterrupt:
I have this code try { //AN EXCEPTION IS GENERATED HERE!!! } catch {
Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]
I'm working on an EF Code first site, and I've written my classes and
I am learning LINQ with F# 3.0. Try to follow the examples by Query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.