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

  • Home
  • SEARCH
  • 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 5838815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:30:29+00:00 2026-05-22T11:30:29+00:00

I’m completely rephrasing (more accurately) I am experiencing with losing reference to a referenced

  • 0

I’m completely rephrasing (more accurately) I am experiencing with losing reference to a referenced class library from a C# Windows service.

Process:
Created a brand new C# .Net v4.0 Windows service.
In that solution I created a new class library that will be called from the service’s OnStart() method, and reference is made in the Windows service to the class library.
I import the RssToolkit project (found here). The RssToolkit project framework is 2.0 (doesn’t matter though), but FYI. Reference is made to the RssToolkit from the class library.

So, we have Windows service –> class library –> RssToolkit.

Windows Service:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using ClassLibraryToExecuteRss;

namespace WindowsService1
{
    public partial class Service1 : ServiceBase
    {
        public Service1()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            Class1.DoSomeWork();

        }

        protected override void OnStop()
        {
        }
    }
}

Class Library:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RssToolkit.Rss;

namespace ClassLibraryToExecuteRss
{
    public static class Class1
    {
        public static void DoSomeWork()
        {
           //RssDocument rssDocument = new RssDocument();
           //rssDocument = RssDocument.Load(new System.Uri("http://www.somerssurl.com"));
        }

    }
}

As you can see, lines of code using the RssDocument class are commented out. With these commented out I can compile the solution just fine… but it’s of little use.

Once uncommented, I receive the following compile errors in the service code:

Error 3 The type or namespace name
‘ClassLibraryToExecuteRss’ could not
be found (are you missing a using
directive or an assembly
reference?) C:\Projects\TestBed\TestingServiceWithXLibs\WindowsService1\WindowsService1\Service1.cs 9 7 WindowsService1

…and…

Error 4 The name ‘Class1’ does not
exist in the current
context C:\Projects\TestBed\TestingServiceWithXLibs\WindowsService1\WindowsService1\Service1.cs 22 13 WindowsService1

So what’s going on here? I built a TDD solution that works fine, but when taking the code that calls that class library from my unit tests into the solution, I get this.

I haven’t changed any of the name spaces, and left everything as default.

Incidentally, I did change the target framework of the RssToolkit to 4.0… no change, and I experienced the same issue as I’m using another external library (SubSonic) in my class library.

Can anyone please shed some light on this?

  • 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-05-22T11:30:30+00:00Added an answer on May 22, 2026 at 11:30 am
    1. Your server project needs to
      reference both your class library
      project and the RssToolkit assembly.
    2. Make sure your service project is targeting the proper framework. Right-click on the project and choose Properties. On the Application tab, make sure you are targeting the proper framework. For instance, perhaps you are targeting the Client Profile when you actually need the whole framework.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am currently running into a problem where an element is coming back from
In my XML file chapters tag has more chapter tag.i need to display chapters
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.